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 |
---|---|---|---|---|---|---|---|---|
CallableTypeParameterNode | class | PHPStan\PhpDocParser\Ast\Type | vendor/ |
2 | ||||
Callable_ | final class | phpDocumentor\Reflection\Types | vendor/ |
Value Object representing a Callable type. | 1 | |||
Callback | class | Symfony\Component\Validator\Constraints | vendor/ |
Defines custom validation rules through arbitrary callback methods. | 3 | |||
Callback | final class | PHPUnit\Framework\Constraint | vendor/ |
@psalm-template CallbackInput of mixed | 3 | |||
Callback | class | Drupal\migrate\Plugin\migrate\process | core/ |
Passes the source value to a callback. | ||||
CallbackPrediction | class | Prophecy\Prediction | vendor/ |
Executes preset callback. | ||||
CallbackPromise | class | Prophecy\Promise | vendor/ |
Evaluates promise callback. | ||||
CallbackToken | class | Prophecy\Argument\Token | vendor/ |
Callback-verified token. | ||||
CallbackValidator | class | Symfony\Component\Validator\Constraints | vendor/ |
Validator for Callback constraint. | ||||
CallCenter | class | Prophecy\Call | vendor/ |
Calls receiver & manager. | 2 | |||
CallExpression | abstract class | Twig\Node\Expression | vendor/ |
3 | ||||
CallExpression | class | Peast\Syntax\Node | vendor/ |
A node that represents a call expression. For example: test() | 1 | |||
CallLike | abstract class | PhpParser\Node\Expr | vendor/ |
5 | 1 | |||
CallPrediction | class | Prophecy\Prediction | vendor/ |
Tests that there was at least one call. | ||||
CallTimePassByReferenceSniff | class | PHP_CodeSniffer\Standards\Generic\Sniffs\Functions | vendor/ |
|||||
CallTimesPrediction | class | Prophecy\Prediction | vendor/ |
Tests that there was exact amount of calls made. | ||||
CallToDeprecatedFunctionRule | class | PHPStan\Rules\Deprecations | vendor/ |
@implements Rule<FuncCall> | ||||
CallToDeprecatedMethodRule | class | PHPStan\Rules\Deprecations | vendor/ |
@implements Rule<MethodCall> | ||||
CallToDeprecatedStaticMethodRule | class | PHPStan\Rules\Deprecations | vendor/ |
@implements Rule<StaticCall> | ||||
CallTrait | trait | Symfony\Component\DependencyInjection\Loader\Configurator\Traits | vendor/ |
|||||
CamelCapsFunctionNameSniff | class | PHP_CodeSniffer\Standards\Generic\Sniffs\NamingConventions | vendor/ |
2 | 2 | |||
CamelCapsMethodNameSniff | class | PHP_CodeSniffer\Standards\PSR1\Sniffs\Methods | vendor/ |
|||||
CamelCaseToSnakeCaseNameConverter | class | Symfony\Component\Serializer\NameConverter | vendor/ |
CamelCase to Underscore name converter. | ||||
CancellationException | class | GuzzleHttp\Promise | vendor/ |
Exception that is set as the reason for a promise that has been cancelled. | ||||
CancellationInterface | interface | OpenTelemetry\SDK\Common\Future | vendor/ |
1 | 29 | |||
CancellationQueue | final class | React\Promise\Internal | vendor/ |
@internal | ||||
CancelUser | class | Drupal\user\Plugin\Action | core/ |
Cancels a user account. | ||||
CannotFindSchemaException | final class | PHPUnit\TextUI\XmlConfiguration | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | ||||
CannotLoadBaselineException | final class | PHPUnit\Runner\Baseline | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 1 | |||
CannotOpenSocketException | final class | PHPUnit\TextUI | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 2 | |||
CannotUseAddMethodsException | final class | PHPUnit\Framework\MockObject\Generator | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 1 | |||
CannotUseOnlyMethodsException | final class | PHPUnit\Framework\MockObject | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | ||||
CannotWriteFileException | class | Symfony\Component\HttpFoundation\File\Exception | vendor/ |
Thrown when an UPLOAD_ERR_CANT_WRITE error occurred with UploadedFile. | 4 | |||
CanonicalPackagesTrait | trait | Composer\Repository | vendor/ |
Provides getCanonicalPackages() to various repository implementations | ||||
Capability | final class | WebDriver | vendor/ |
WebDriver\Capability class | ||||
Capability | interface | Composer\Plugin\Capability | vendor/ |
Marker interface for Plugin capabilities. Every new Capability which is added to the Plugin API must implement this interface. | 1 | 1 | ||
Capability | final class | WebDriver\SauceLabs | vendor/ |
WebDriver\SauceLabs\Capability class | ||||
Capable | interface | Composer\Plugin | vendor/ |
Plugins which need to expose various implementations of the Composer Plugin Capabilities must have their declared Plugin class implementing this interface. | 1 | 1 | ||
CaptureNode | class | Twig\Node | vendor/ |
Represents a node for which we need to capture the output. | ||||
Cardinality | class | Google\Protobuf\Field | vendor/ |
Whether a field is optional, required, or repeated. | ||||
CardScheme | class | Symfony\Component\Validator\Constraints | vendor/ |
Validates a credit card number for a given credit card company. | ||||
CardSchemeValidator | class | Symfony\Component\Validator\Constraints | vendor/ |
Validates that a card number belongs to a specified scheme. | ||||
Cascade | class | Symfony\Component\Validator\Constraints | vendor/ |
Validates a whole class, including nested objects in properties. | 2 | |||
CascadingStrategy | class | Symfony\Component\Validator\Mapping | vendor/ |
Specifies whether an object should be cascaded. | 3 | |||
Case_ | class | PhpParser\Node\Stmt | vendor/ |
1 | ||||
Cast | abstract class | PhpParser\Node\Expr | vendor/ |
7 | 10 | |||
CastedIntFieldJoin | class | Drupal\views\Plugin\views\join | core/ |
Implementation for the "casted_int_field_join" join. | ||||
Caster | class | Symfony\Component\VarDumper\Caster | vendor/ |
Helper for filtering out properties in casters. | 4 | |||
CastSpacingSniff | class | PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace | vendor/ |
|||||
CastSql | class | Drupal\views\Plugin\views\query | core/ |
Cast handling in SQL. | 2 |