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 |
---|---|---|---|---|---|---|---|---|
PluralTranslation | class | Drupal\Core\Annotation | core/ |
Defines an annotation object for strings that require plural forms. | ||||
PluralVariants | class | Drupal\config_translation\FormElement | core/ |
Defines form elements for plurals in configuration translation. | ||||
Plus | class | PhpParser\Node\Expr\BinaryOp | vendor/ |
|||||
Plus | class | PhpParser\Node\Expr\AssignOp | vendor/ |
|||||
PoDatabaseReader | class | Drupal\locale | core/ |
Gettext PO reader working with the locale module database. | 1 | |||
PoDatabaseWriter | class | Drupal\locale | core/ |
Gettext PO writer working with the locale module database. | ||||
PoHeader | class | Drupal\Component\Gettext | core/ |
Gettext PO header handler. | 2 | |||
PoItem | class | Drupal\Component\Gettext | core/ |
PoItem handles one translation. | 10 | |||
PolicyInterface | interface | Composer\DependencyResolver | vendor/ |
@author Nils Adermann <naderman@naderman.de> | 1 | 1 | ||
PoMemoryWriter | class | Drupal\Component\Gettext | core/ |
Defines a Gettext PO memory writer, to be used by the installer. | 1 | |||
PoMetadataInterface | interface | Drupal\Component\Gettext | core/ |
Methods required for both reader and writer implementations. | 2 | |||
Pool | class | Composer\DependencyResolver | vendor/ |
A package pool contains all packages for dependency resolution | 5 | |||
Pool | class | GuzzleHttp | vendor/ |
Sends an iterator of requests concurrently using a capped pool size. | ||||
PoolBuilder | class | Composer\DependencyResolver | vendor/ |
@author Nils Adermann <naderman@naderman.de> | 1 | |||
PoolOptimizer | class | Composer\DependencyResolver | vendor/ |
Optimizes a given pool | 2 | |||
PoReaderInterface | interface | Drupal\Component\Gettext | core/ |
Shared interface definition for all Gettext PO Readers. | 2 | 2 | ||
PortoInstaller | class | Composer\Installers | vendor/ |
|||||
PortRequestMatcher | class | Symfony\Component\HttpFoundation\RequestMatcher | vendor/ |
Checks the HTTP port of a Request. | ||||
Position | class | Peast\Syntax | vendor/ |
This class represents the position in the source code. | 1 | |||
Positive | class | Symfony\Component\Validator\Constraints | vendor/ |
Validates that a value is a positive number. | ||||
PositiveInteger | final class | phpDocumentor\Reflection\PseudoTypes | vendor/ |
Value Object representing the type 'int'. | 1 | |||
PositiveOrZero | class | Symfony\Component\Validator\Constraints | vendor/ |
Validates that a value is a positive number or equal to zero. | ||||
PostApplyEvent | final class | Drupal\package_manager\Event | core/ |
Event fired after staged changes are synced to the active directory. | 4 | |||
PostCondition | final class | PHPUnit\Framework\Attributes | vendor/ |
@psalm-immutable | 2 | |||
PostCondition | final class | PHPUnit\Metadata | vendor/ |
@psalm-immutable | ||||
PostConditionCalled | final class | PHPUnit\Event\Test | vendor/ |
@psalm-immutable | ||||
PostConditionCalledSubscriber | interface | PHPUnit\Event\Test | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | ||||
PostConditionFinished | final class | PHPUnit\Event\Test | vendor/ |
@psalm-immutable | ||||
PostConditionFinishedSubscriber | interface | PHPUnit\Event\Test | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | ||||
PostCreateEvent | final class | Drupal\package_manager\Event | core/ |
Event fired after a stage directory has been created. | 2 | |||
PostDec | class | PhpParser\Node\Expr | vendor/ |
|||||
PostFileDownloadEvent | class | Composer\Plugin | vendor/ |
The post file download event. | 2 | |||
PostgresqlDateSql | class | Drupal\views\Plugin\views\query | core/ |
PostgreSQL-specific date handling. | 2 | |||
PostgreSqlStore | class | Symfony\Component\Lock\Store | vendor/ |
PostgreSqlStore is a PersistingStoreInterface implementation using PostgreSql advisory locks. | ||||
PostInc | class | PhpParser\Node\Expr | vendor/ |
|||||
PostPackageEventListenerInterface | interface | Drupal\Composer\Plugin\Scaffold | composer/ |
Interface for post package event listeners. | 1 | |||
PoStreamInterface | interface | Drupal\Component\Gettext | core/ |
Common functions for file/stream based PO readers/writers. | 2 | |||
PoStreamReader | class | Drupal\Component\Gettext | core/ |
Implements Gettext PO stream reader. | 2 | |||
PoStreamWriter | class | Drupal\Component\Gettext | core/ |
Defines a Gettext PO stream writer. | 1 | |||
PostRequireEvent | final class | Drupal\package_manager\Event | core/ |
Event fired after packages are updated to the stage directory. | 2 | |||
PostStatementCommentSniff | class | Drupal\Sniffs\Commenting | vendor/ |
Largely copied from \PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting\PostStatementCommentSniff but we want the fixer to move the comment to the previous line. | ||||
PostStatementCommentSniff | class | PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting | vendor/ |
|||||
PosUnary | class | Twig\Node\Expression\Unary | vendor/ |
3 | ||||
Pow | class | PhpParser\Node\Expr\BinaryOp | vendor/ |
|||||
Pow | class | PhpParser\Node\Expr\AssignOp | vendor/ |
|||||
PowerBinary | class | Twig\Node\Expression\Binary | vendor/ |
1 | ||||
PoWriterInterface | interface | Drupal\Component\Gettext | core/ |
Shared interface definition for all Gettext PO Writers. | 3 | 1 | ||
PPIInstaller | class | Composer\Installers | vendor/ |
|||||
PreApplyEvent | final class | Drupal\package_manager\Event | core/ |
Event fired before staged changes are synced to the active directory. | 19 | |||
Precedence | class | PhpParser\Node\Stmt\TraitUseAdaptation | vendor/ |