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 |
---|---|---|---|---|---|---|---|---|
ConsoleLogger | class | Symfony\Component\Console\Logger | vendor/ |
PSR-3 compliant console logger. | 1 | |||
ConsoleMetricExporter | class | OpenTelemetry\SDK\Metrics\MetricExporter | vendor/ |
Console metrics exporter. Note that the output is human-readable JSON, not compatible with OTLP. | ||||
ConsoleMetricExporterFactory | class | OpenTelemetry\SDK\Metrics\MetricExporter | vendor/ |
|||||
ConsoleOutput | class | Symfony\Component\Console\Output | vendor/ |
ConsoleOutput is the default class for all CLI output. It uses STDOUT and STDERR. | 4 | |||
ConsoleOutputInterface | interface | Symfony\Component\Console\Output | vendor/ |
ConsoleOutputInterface is the interface implemented by ConsoleOutput class. This adds information about stderr and section output stream. | 1 | 12 | ||
ConsoleSectionOutput | class | Symfony\Component\Console\Output | vendor/ |
@author Pierre du Plessis <pdples@gmail.com> @author Gabriel Ostrolucký <gabriel.ostrolucky@gmail.com> | 4 | |||
ConsoleSignalEvent | final class | Symfony\Component\Console\Event | vendor/ |
@author marie <marie@users.noreply.github.com> | 2 | |||
ConsoleSpanExporter | class | OpenTelemetry\SDK\Trace\SpanExporter | vendor/ |
|||||
ConsoleSpanExporterFactory | class | OpenTelemetry\SDK\Trace\SpanExporter | vendor/ |
|||||
ConsoleTerminateEvent | final class | Symfony\Component\Console\Event | vendor/ |
Allows to manipulate the exit code of a command after its execution. | 3 | |||
Console_Getopt | class | vendor/ |
Command-line options parsing class. | |||||
Constant | final class | OpenTelemetry\SDK\Resource\Detectors | vendor/ |
|||||
Constant | final class | PHPUnit\TextUI\Configuration | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 1 | |||
ConstantCollection | final class | PHPUnit\TextUI\Configuration | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 2 | |||
ConstantCollectionIterator | final class | PHPUnit\TextUI\Configuration | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | ||||
ConstantDecision | class | Opentelemetry\Proto\Trace\V1\ConstantSampler | vendor/ |
How spans should be sampled: | ||||
ConstantExpression | class | Twig\Node\Expression | vendor/ |
@final | 24 | |||
ConstantHelper | class | SlevomatCodingStandard\Helpers | vendor/ |
@internal | 1 | |||
ConstantNameSniff | class | Drupal\Sniffs\Semantics | vendor/ |
Checks that constants introduced with define() in module or install files start with the module's name. | ||||
Constants | class | VariableAnalysis\Lib | vendor/ |
2 | ||||
ConstantSampler | class | Opentelemetry\Proto\Trace\V1 | vendor/ |
Sampler that always makes a constant decision on span sampling. | ||||
ConstantSpacingSniff | class | SlevomatCodingStandard\Sniffs\Classes | vendor/ |
|||||
ConstantTest | class | Twig\Node\Expression\Test | vendor/ |
Checks if a variable is the exact same value as a constant. | 1 | |||
ConstantVisibilitySniff | class | PHP_CodeSniffer\Standards\PSR12\Sniffs\Properties | vendor/ |
|||||
ConstExprArrayItemNode | class | PHPStan\PhpDocParser\Ast\ConstExpr | vendor/ |
|||||
ConstExprArrayNode | class | PHPStan\PhpDocParser\Ast\ConstExpr | vendor/ |
1 | ||||
ConstExpression | final class | phpDocumentor\Reflection\PseudoTypes | vendor/ |
@psalm-immutable | 1 | |||
ConstExprEvaluationException | class | PhpParser | vendor/ |
|||||
ConstExprEvaluator | class | PhpParser | vendor/ |
Evaluates constant expressions. | ||||
ConstExprFalseNode | class | PHPStan\PhpDocParser\Ast\ConstExpr | vendor/ |
|||||
ConstExprFloatNode | class | PHPStan\PhpDocParser\Ast\ConstExpr | vendor/ |
2 | ||||
ConstExprIntegerNode | class | PHPStan\PhpDocParser\Ast\ConstExpr | vendor/ |
6 | ||||
ConstExprNode | interface | PHPStan\PhpDocParser\Ast\ConstExpr | vendor/ |
10 | 5 | |||
ConstExprNullNode | class | PHPStan\PhpDocParser\Ast\ConstExpr | vendor/ |
|||||
ConstExprParser | class | PHPStan\PhpDocParser\Parser | vendor/ |
3 | ||||
ConstExprStringNode | class | PHPStan\PhpDocParser\Ast\ConstExpr | vendor/ |
2 | 6 | |||
ConstExprTrueNode | class | PHPStan\PhpDocParser\Ast\ConstExpr | vendor/ |
|||||
ConstFetch | class | PhpParser\Node\Expr | vendor/ |
4 | ||||
ConstFetchNode | class | PHPStan\PhpDocParser\Ast\ConstExpr | vendor/ |
6 | ||||
Constraint | class | Drupal\Core\Validation\Annotation | core/ |
Defines a validation constraint annotation object. | ||||
Constraint | abstract class | Symfony\Component\Validator | vendor/ |
Contains the properties of a constraint definition. | 116 | 273 | ||
Constraint | abstract class | JsonSchema\Constraints | vendor/ |
The Base Constraints, all Validators should extend this class | 9 | 3 | ||
Constraint | class | Drupal\Core\Validation\Attribute | core/ |
Defines a Constraint attribute object. | 77 | |||
Constraint | class | Composer\Semver\Constraint | vendor/ |
Defines a constraint. | 31 | |||
Constraint | abstract class | PHPUnit\Framework\Constraint | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 73 | 37 | ||
Constraint | class | Drupal\Component\Version | core/ |
A value object representing a Drupal version constraint. | 1 | |||
ConstraintDefinitionException | class | Symfony\Component\Validator\Exception | vendor/ |
32 | ||||
ConstraintFactory | class | Drupal\Core\Validation | core/ |
Constraint plugin factory. | ||||
ConstraintInterface | interface | JsonSchema\Constraints | vendor/ |
The Constraints Interface | 1 | |||
ConstraintInterface | interface | Composer\Semver\Constraint | vendor/ |
DO NOT IMPLEMENT this interface. It is only meant for usage as a type hint in libraries relying on composer/semver but creating your own constraint class that implements this interface is not a supported use case and will cause the composer/semver… | 4 | 27 |