Classes, traits, and interfaces - Drupal 11.1.x - Drupal Core
Primary tabs
Introduction to classes
A lot of the PHP code in Drupal is object oriented (OO), making use of PHP classes, interfaces, and traits. See the Objected-oriented programming conventions for more information.
See also
Objected-oriented programming conventions
File
-
core/
core.api.php, line 1518
Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
---|---|---|---|---|---|---|---|---|
NamedArgumentSpacingSniff | class | SlevomatCodingStandard\Sniffs\Functions | vendor/ |
|||||
NamedColoursSniff | class | PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS | vendor/ |
|||||
NameDeprecation | class | Twig\Node | vendor/ |
Represents a deprecation for a named node or attribute on a Node. | 3 | |||
NamedParameterMap | class | Ramsey\Collection\Map | vendor/ |
`NamedParameterMap` represents a mapping of values to a set of named keys that may optionally be typed | ||||
NamedSelector | class | Behat\Mink\Selector | vendor/ |
Named selectors engine. Uses registered XPath selectors to create new expressions. | 2 | |||
NameException | class | Ramsey\Uuid\Exception | vendor/ |
Thrown to indicate that an error occurred while attempting to hash a namespace and name | 2 | |||
NameExpression | class | Twig\Node\Expression | vendor/ |
2 | 12 | |||
NameFilterIterator | final class | PHPUnit\Runner\Filter | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | ||||
NameGenerator | class | Prophecy\Doubler | vendor/ |
Name generator. Generates classname for double. | ||||
NameGeneratorFactory | class | Ramsey\Uuid\Generator | vendor/ |
NameGeneratorFactory retrieves a default name generator, based on the environment | 1 | |||
NameGeneratorInterface | interface | Ramsey\Uuid\Generator | vendor/ |
A name generator generates strings of binary data created by hashing together a namespace with a name, according to a hashing algorithm | 2 | 2 | ||
NamePart | class | Google\Protobuf\Internal\UninterpretedOption | vendor/ |
The name of the uninterpreted option. Each string represents a segment in a dot-separated name. is_extension is true iff a segment represents an extension (denoted with parentheses in options specs in .proto files). E.g.,{ ["foo", false],… | ||||
NamePrettifier | final class | PHPUnit\Logging\TestDox | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 1 | |||
NameResolver | class | PhpParser\NodeVisitor | vendor/ |
2 | ||||
NamespaceCheck | final class | mglaman\PHPStanDrupal\Internal | vendor/ |
@internal | 1 | |||
NamespacedDependencySniff | class | DrupalPractice\Sniffs\InfoFiles | vendor/ |
Checks that all declared dependencies are namespaced. | ||||
NamespaceDeclarationSniff | class | SlevomatCodingStandard\Sniffs\Namespaces | vendor/ |
|||||
NamespaceDeclarationSniff | class | PHP_CodeSniffer\Standards\PSR2\Sniffs\Namespaces | vendor/ |
|||||
NamespaceHelper | class | SlevomatCodingStandard\Helpers | vendor/ |
Terms "unqualified", "qualified" and "fully qualified" have the same meaning as described here: http://php.net/manual/en/language.namespaces.rules.php | 21 | |||
NamespaceNotFoundException | class | Symfony\Component\Console\Exception | vendor/ |
Represents an incorrect namespace typed in the console. | 1 | |||
NamespaceSniff | class | Drupal\Sniffs\WhiteSpace | vendor/ |
Checks that there is exactly one space after the namespace keyword. | ||||
NamespaceSpacingSniff | class | SlevomatCodingStandard\Sniffs\Namespaces | vendor/ |
|||||
NamespaceUri | class | TheSeer\Tokenizer | vendor/ |
1 | ||||
NamespaceUriException | class | TheSeer\Tokenizer | vendor/ |
|||||
Namespace_ | class | PhpParser\Node\Stmt | vendor/ |
1 | ||||
Namespace_ | class | PhpParser\Builder | vendor/ |
|||||
Namespace_ | class | PhpParser\Node\Scalar\MagicConst | vendor/ |
|||||
NativeCalculator | class | Brick\Math\Internal\Calculator | vendor/ |
Calculator implementation using only native PHP code. | ||||
NativeFileSessionHandler | class | Symfony\Component\HttpFoundation\Session\Storage\Handler | vendor/ |
Native session handler using PHP's built in file storage. | ||||
NativeSessionStorage | class | Symfony\Component\HttpFoundation\Session\Storage | vendor/ |
This provides a base class for session attribute storage. | 2 | 2 | ||
NativeSessionStorageFactory | class | Symfony\Component\HttpFoundation\Session\Storage | vendor/ |
@author Jérémy Derussé <jeremy@derusse.com> | ||||
NativeTransportFactory | final class | Symfony\Component\Mailer\Transport | vendor/ |
Factory that configures a transport (sendmail or SMTP) based on php.ini settings. | 1 | |||
NavigationContentLinks | final class | Drupal\navigation | core/ |
Build the menu links for the Content menu. | 1 | |||
NavigationHooks | class | Drupal\navigation\Hook | core/ |
Hook implementations for navigation. | ||||
NavigationLayout | final class | Drupal\navigation | core/ |
Defines a layout class for navigation. | 1 | |||
NavigationLinkBlock | final class | Drupal\navigation\Plugin\Block | core/ |
Defines a link navigation block. | ||||
NavigationMenuBlock | final class | Drupal\navigation\Plugin\Block | core/ |
Provides a generic menu navigation block. | ||||
NavigationMenuLinkTree | final class | Drupal\navigation\Menu | core/ |
Extends MenuLinkTree to add specific theme suggestions for the navigation. | 2 | |||
NavigationRenderer | final class | Drupal\navigation | core/ |
Handle rendering for different pieces of the navigation. | 3 | 2 | ||
NavigationSectionStorage | final class | Drupal\navigation\Plugin\SectionStorage | core/ |
Provides navigation section storage. | 2 | |||
NavigationServiceProvider | final class | Drupal\navigation | core/ |
Defines a service provider for the Navigation module. | ||||
NavigationShortcutsBlock | final class | Drupal\navigation\Plugin\Block | core/ |
Defines a shortcuts navigation block class. | ||||
NavigationTopBarHooks | class | Drupal\navigation_top_bar\Hook | core/ |
Hook implementations for navigation_top_bar. | ||||
NavigationUserBlock | final class | Drupal\navigation\Plugin\Block | core/ |
Defines a user navigation block. | ||||
NearMissValueResolverException | class | Symfony\Component\HttpKernel\Exception | vendor/ |
Lets value resolvers tell when an argument could be under their watch but failed to be resolved. | 4 | |||
NegationNode | class | Symfony\Component\CssSelector\Node | vendor/ |
Represents a "<selector>:not(<identifier>)" node. | ||||
NegationOperatorSpacingSniff | class | SlevomatCodingStandard\Sniffs\Operators | vendor/ |
|||||
Negative | class | Symfony\Component\Validator\Constraints | vendor/ |
Validates that a value is a negative number. | ||||
NegativeInteger | final class | phpDocumentor\Reflection\PseudoTypes | vendor/ |
Value Object representing the type 'int'. | 1 | |||
NegativeNumberException | class | Brick\Math\Exception | vendor/ |
Exception thrown when attempting to perform an unsupported operation, such as a square root, on a negative number. | 2 |