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 |
---|---|---|---|---|---|---|---|---|
ArgumentMetadata | class | Symfony\Component\HttpKernel\ControllerMetadata | vendor/ |
Responsible for storing metadata of an argument. | 20 | |||
ArgumentMetadataFactory | final class | Symfony\Component\HttpKernel\ControllerMetadata | vendor/ |
Builds { @author Iltar van der Berg <kjarli@gmail.com> | 1 | |||
ArgumentMetadataFactoryInterface | interface | Symfony\Component\HttpKernel\ControllerMetadata | vendor/ |
Builds method argument data. | 1 | 1 | ||
ArgumentNode | class | Prophecy\Doubler\Generator\Node | vendor/ |
Argument node. | 2 | |||
ArgumentPluginBase | abstract class | Drupal\views\Plugin\views\argument | core/ |
Base class for argument (contextual filter) handler plugins. | 13 | 8 | ||
ArgumentResolver | final class | Symfony\Component\HttpKernel\Controller | vendor/ |
Responsible for resolving the arguments passed to an action. | 1 | |||
ArgumentResolverInterface | interface | Symfony\Component\HttpKernel\Controller | vendor/ |
An ArgumentResolverInterface instance knows how to determine the arguments for a specific action. | 2 | 8 | ||
ArgumentsResolver | class | Drupal\Component\Utility | core/ |
Resolves the arguments to pass to a callable. | 2 | |||
ArgumentsResolverInterface | interface | Drupal\Component\Utility | core/ |
Resolves the arguments to pass to a callable. | 1 | 1 | ||
ArgumentsWildcard | class | Prophecy\Argument | vendor/ |
Arguments wildcarding. | 6 | |||
ArgumentTrait | trait | Symfony\Component\DependencyInjection\Loader\Configurator\Traits | vendor/ |
|||||
ArgumentTypeNode | class | Prophecy\Doubler\Generator\Node | vendor/ |
3 | ||||
ArgumentValidatorPluginBase | abstract class | Drupal\views\Plugin\views\argument_validator | core/ |
Base argument validator plugin to provide basic functionality. | 3 | |||
ArgvInput | class | Symfony\Component\Console\Input | vendor/ |
ArgvInput represents an input coming from the CLI arguments. | 2 | 2 | ||
ArrayAccessGetterSetter | final class | OpenTelemetry\Context\Propagation | vendor/ |
Default implementation of {This type is used if no custom getter/setter is provided to { | 2 | |||
ArrayAccessSniff | class | SlevomatCodingStandard\Sniffs\Arrays | vendor/ |
|||||
ArrayBracketSpacingSniff | class | PHP_CodeSniffer\Standards\Squiz\Sniffs\Arrays | vendor/ |
|||||
ArrayBuild | class | Drupal\migrate\Plugin\migrate\process | core/ |
Builds an array based on the key and value configuration. | 1 | 1 | ||
ArrayComparator | class | SebastianBergmann\Comparator | vendor/ |
Arrays are equal if they contain the same key-value pairs. The order of the keys does not matter. The types of key-value pairs do not matter. | 1 | |||
ArrayCountToken | class | Prophecy\Argument\Token | vendor/ |
Array elements count token. | ||||
ArrayDeclarationSniff | class | PHP_CodeSniffer\Standards\Squiz\Sniffs\Arrays | vendor/ |
|||||
ArrayDenormalizer | class | Symfony\Component\Serializer\Normalizer | vendor/ |
Denormalizes arrays of objects. | ||||
ArrayDimFetch | class | PhpParser\Node\Expr | vendor/ |
|||||
ArrayDumper | class | Composer\Package\Dumper | vendor/ |
@author Konstantin Kudryashiv <ever.zet@gmail.com> @author Jordi Boggiano <j.boggiano@seld.be> | 8 | |||
ArrayElement | abstract class | Drupal\Core\Config\Schema | core/ |
Defines a generic configuration element that contains multiple properties. | 2 | 1 | ||
ArrayEntryToken | class | Prophecy\Argument\Token | vendor/ |
Array entry token. | ||||
ArrayEveryEntryToken | class | Prophecy\Argument\Token | vendor/ |
Array every entry token. | ||||
ArrayExpression | class | Twig\Node\Expression | vendor/ |
1 | 8 | |||
ArrayExpression | class | Peast\Syntax\Node | vendor/ |
A node that represents an array literal. For example: [a, b, c] | ||||
ArrayHasKey | final class | PHPUnit\Framework\Constraint | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 2 | |||
ArrayHelper | class | SlevomatCodingStandard\Helpers | vendor/ |
@internal | 5 | |||
ArrayIndentSniff | class | PHP_CodeSniffer\Standards\Generic\Sniffs\Arrays | vendor/ |
|||||
ArrayInput | class | Symfony\Component\Console\Input | vendor/ |
ArrayInput represents an input provided as an array. | 7 | |||
ArrayInterface | interface | Ramsey\Collection | vendor/ |
`ArrayInterface` provides traversable array functionality to data types. | 4 | 1 | ||
ArrayItem | class | PhpParser\Node | vendor/ |
2 | ||||
ArrayKey | final class | phpDocumentor\Reflection\Types | vendor/ |
Value Object representing a array-key Type. | 2 | |||
ArrayKeyValue | class | SlevomatCodingStandard\Helpers | vendor/ |
@internal | 1 | |||
ArrayLoader | class | Composer\Package\Loader | vendor/ |
@author Konstantin Kudryashiv <ever.zet@gmail.com> @author Jordi Boggiano <j.boggiano@seld.be> | 1 | 12 | ||
ArrayLoader | final class | Twig\Loader | vendor/ |
Loads a template from an array. | 3 | |||
ArrayObjectFilter | final class | DeepCopy\TypeFilter\Spl | vendor/ |
In PHP 7.4 the storage of an ArrayObject isn't returned as ReflectionProperty. So we deep copy its array copy. | 1 | |||
ArrayPattern | class | Peast\Syntax\Node | vendor/ |
A node that represents an array binding pattern. For example: [a, b, c] = d | ||||
ArrayRepository | class | Composer\Repository | vendor/ |
A repository implementation that simply stores packages in an array | 10 | 2 | ||
ArrayShape | class | phpDocumentor\Reflection\PseudoTypes | vendor/ |
@psalm-immutable | 1 | 1 | ||
ArrayShapeItem | class | phpDocumentor\Reflection\PseudoTypes | vendor/ |
1 | 1 | |||
ArrayShapeItemNode | class | PHPStan\PhpDocParser\Ast\Type | vendor/ |
3 | ||||
ArrayShapeNode | class | PHPStan\PhpDocParser\Ast\Type | vendor/ |
6 | ||||
ArrayShapeUnsealedTypeNode | class | PHPStan\PhpDocParser\Ast\Type | vendor/ |
1 | ||||
ArraySniff | class | Drupal\Sniffs\Arrays | vendor/ |
ArraySniff. | ||||
ArrayTypeNode | class | PHPStan\PhpDocParser\Ast\Type | vendor/ |
7 | ||||
ArrayValue | class | Opentelemetry\Proto\Common\V1 | vendor/ |
ArrayValue is a list of AnyValue messages. We need ArrayValue as a message since oneof in AnyValue does not allow repeated fields. | 1 |