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 |
---|---|---|---|---|---|---|---|---|
PropagatorFactory | class | OpenTelemetry\SDK\Propagation | vendor/ |
1 | ||||
Property | final class | phpDocumentor\Reflection\DocBlock\Tags | vendor/ |
Reflection class for a {property tag in a Docblock. | 2 | |||
Property | class | Peast\Syntax\Node | vendor/ |
A node that represents a property in an object literal. For example "b" in: a = {b: 1} | 1 | |||
Property | class | PhpParser\Builder | vendor/ |
|||||
Property | class | PhpParser\Node\Scalar\MagicConst | vendor/ |
|||||
Property | class | PhpParser\Node\Stmt | vendor/ |
1 | ||||
PropertyDeclarationSniff | class | PHP_CodeSniffer\Standards\PSR2\Sniffs\Classes | vendor/ |
|||||
PropertyDeclarationSniff | class | SlevomatCodingStandard\Sniffs\Classes | vendor/ |
|||||
PropertyDeclarationSniff | class | Drupal\Sniffs\Classes | vendor/ |
Largely copied from \PHP_CodeSniffer\Standards\PSR2\Sniffs\Classes\PropertyDeclarationSniff to have a fixer for the var keyword. | ||||
PropertyDefinition | class | Peast\Syntax\Node | vendor/ |
A node that represents a property definition in class body. | ||||
PropertyException | class | DeepCopy\Exception | vendor/ |
1 | ||||
PropertyFactory | final class | phpDocumentor\Reflection\DocBlock\Tags\Factory | vendor/ |
@internal This class is not part of the BC promise of this library. | 1 | |||
PropertyFetch | class | PhpParser\Node\Expr | vendor/ |
1 | ||||
PropertyHelper | class | SlevomatCodingStandard\Helpers | vendor/ |
@internal | 13 | |||
PropertyHook | class | PhpParser\Node | vendor/ |
2 | ||||
PropertyInfoLoader | final class | Symfony\Component\Validator\Mapping\Loader | vendor/ |
Guesses and loads the appropriate constraints using PropertyInfo. | ||||
PropertyItem | class | PhpParser\Node | vendor/ |
2 | ||||
PropertyLabelSpacingSniff | class | PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace | vendor/ |
|||||
PropertyMatcher | class | DeepCopy\Matcher | vendor/ |
@final | ||||
PropertyMetadata | class | Symfony\Component\Validator\Mapping | vendor/ |
Stores all metadata needed for validating a class property. | 1 | |||
PropertyMetadataInterface | interface | Symfony\Component\Validator\Mapping | vendor/ |
Stores all metadata needed for validating the value of a class property. | 1 | 3 | ||
PropertyNameMatcher | class | DeepCopy\Matcher | vendor/ |
@final | ||||
PropertyNormalizer | final class | Symfony\Component\Serializer\Normalizer | vendor/ |
Converts between objects and arrays by mapping properties. | 1 | |||
PropertyNormalizerContextBuilder | final class | Symfony\Component\Serializer\Context\Normalizer | vendor/ |
A helper providing autocompletion for available PropertyNormalizer options. | ||||
PropertyPath | class | Symfony\Component\Validator\Util | vendor/ |
Contains utility methods for dealing with property paths. | 6 | |||
PropertyRead | final class | phpDocumentor\Reflection\DocBlock\Tags | vendor/ |
Reflection class for a {property-read tag in a Docblock. | 2 | |||
PropertyReadFactory | final class | phpDocumentor\Reflection\DocBlock\Tags\Factory | vendor/ |
@internal This class is not part of the BC promise of this library. | 1 | |||
PropertySpacingSniff | class | SlevomatCodingStandard\Sniffs\Classes | vendor/ |
|||||
PropertyTagValueNode | class | PHPStan\PhpDocParser\Ast\PhpDoc | vendor/ |
4 | ||||
PropertyTokenEmulator | final class | PhpParser\Lexer\TokenEmulator | vendor/ |
1 | ||||
PropertyTrait | trait | Symfony\Component\DependencyInjection\Loader\Configurator\Traits | vendor/ |
|||||
PropertyTypeHintSniff | class | SlevomatCodingStandard\Sniffs\TypeHints | vendor/ |
|||||
PropertyTypeMatcher | class | DeepCopy\Matcher | vendor/ |
Matches a property by its type. | ||||
PropertyWrite | final class | phpDocumentor\Reflection\DocBlock\Tags | vendor/ |
Reflection class for a {property-write tag in a Docblock. | 2 | |||
PropertyWriteFactory | final class | phpDocumentor\Reflection\DocBlock\Tags\Factory | vendor/ |
@internal This class is not part of the BC promise of this library. | 1 | |||
ProphecyComparator | class | Prophecy\Comparator | vendor/ |
@final | ||||
ProphecyException | interface | Prophecy\Exception\Prophecy | vendor/ |
1 | ||||
ProphecyInterface | interface | Prophecy\Prophecy | vendor/ |
Core Prophecy interface. | 1 | 2 | ||
ProphecySubjectInterface | interface | Prophecy\Prophecy | vendor/ |
Controllable doubles interface. | 1 | |||
ProphecySubjectPatch | class | Prophecy\Doubler\ClassPatch | vendor/ |
Add Prophecy functionality to the double. This is a core class patch for Prophecy. | ||||
ProphecyTrait | trait | Prophecy\PhpUnit | vendor/ |
@mixin TestCase | ||||
Prophet | class | Prophecy | vendor/ |
Prophet creates prophecies. | 2 | |||
ProtectedDirectory | class | Drupal\Core\File | core/ |
A value object representing a protected directory. | ||||
ProtectedPhpFileLoader | final class | Symfony\Component\Routing\Loader | vendor/ |
@internal | ||||
ProtectedPhpFileLoader | final class | Symfony\Component\DependencyInjection\Loader | vendor/ |
@internal | ||||
ProtectedUserFieldConstraint | class | Drupal\user\Plugin\Validation\Constraint | core/ |
Checks if the plain text password is provided for editing a protected field. | ||||
ProtectedUserFieldConstraintValidator | class | Drupal\user\Plugin\Validation\Constraint | core/ |
Validates the ProtectedUserFieldConstraint constraint. | ||||
ProtobufSerializer | final class | OpenTelemetry\Contrib\Otlp | vendor/ |
@internal @psalm-type SUPPORTED_CONTENT_TYPES = ContentTypes::PROTOBUF|ContentTypes::JSON|ContentTypes::NDJSON | ||||
Protocols | class | OpenTelemetry\Contrib\Otlp | vendor/ |
|||||
ProtocolVersionCacheContext | class | Drupal\Core\Cache\Context | core/ |
Defines the ProtocolVersionCacheContext service, for "per protocol" caching. |