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 |
---|---|---|---|---|---|---|---|---|
Client | class | GuzzleHttp | vendor/ |
@final | 4 | |||
ClientErrorResponseSubscriber | class | Drupal\Core\EventSubscriber | core/ |
Response subscriber to set the '4xx-response' cache tag on 4xx responses. | ||||
ClientException | class | GuzzleHttp\Exception | vendor/ |
Exception when a client error is encountered (4xx codes) | ||||
ClientExceptionInterface | interface | Psr\Http\Client | vendor/ |
Every HTTP client related exception MUST implement this interface. | 4 | 13 | ||
ClientFactory | class | Drupal\Core\Http | core/ |
Helper class to construct a HTTP client with Drupal specific config. | ||||
ClientInterface | interface | GuzzleHttp | vendor/ |
Client interface for sending HTTP requests. | 1 | 10 | ||
ClientInterface | interface | Psr\Http\Client | vendor/ |
3 | 15 | |||
ClientTrait | trait | GuzzleHttp | vendor/ |
Client interface for sending HTTP requests. | ||||
CliErrorRenderer | class | Symfony\Component\ErrorHandler\ErrorRenderer | vendor/ |
@author Nicolas Grekas <p@tchwork.com> | 1 | |||
CliRequest | final class | Symfony\Component\Console\Debug | vendor/ |
@internal | 1 | |||
Clock | final class | OpenTelemetry\API\Common\Time | vendor/ |
7 | ||||
ClockFactory | Use OpenTelemetry\API\Common\Time\Clock |
class | OpenTelemetry\SDK\Common\Time | vendor/ |
@codeCoverageIgnore | |||
ClockInterface | interface | OpenTelemetry\API\Common\Time | vendor/ |
2 | 10 | |||
ClockInterface | Use OpenTelemetry\API\Common\Time\ClockInterface |
interface | OpenTelemetry\SDK\Common\Time | vendor/ |
||||
CloneException | class | DeepCopy\Exception | vendor/ |
1 | ||||
Cloner | final class | PHPUnit\Util | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 2 | |||
ClonerInterface | interface | Symfony\Component\VarDumper\Cloner | vendor/ |
@author Nicolas Grekas <p@tchwork.com> | 1 | 3 | ||
Clone_ | class | PhpParser\Node\Expr | vendor/ |
|||||
CloningVisitor | class | PhpParser\NodeVisitor | vendor/ |
Visitor cloning all nodes and linking to the original nodes using an attribute. | ||||
CloningVisitor | final class | PHPStan\PhpDocParser\Ast\NodeVisitor | vendor/ |
1 | ||||
CloseBracketSpacingSniff | class | Drupal\Sniffs\WhiteSpace | vendor/ |
Checks that there is no white space before a closing bracket, for ")" and "}". Square Brackets are handled by \PHP_CodeSniffer\Standards\Squiz\Sniffs\Arrays\ArrayBracketSpacingSniff. | ||||
CloseDialogCommand | class | Drupal\Core\Ajax | core/ |
Defines an AJAX command that closes the current active dialog. | 1 | 4 | ||
CloseModalDialogCommand | class | Drupal\Core\Ajax | core/ |
Defines an AJAX command that closes the currently visible modal dialog. | 1 | |||
ClosingBraceSniff | class | PHP_CodeSniffer\Standards\PSR12\Sniffs\Classes | vendor/ |
|||||
ClosingDeclarationCommentSniff | class | PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting | vendor/ |
|||||
ClosingPHPTagSniff | class | PHP_CodeSniffer\Standards\Generic\Sniffs\PHP | vendor/ |
|||||
ClosingTagSniff | class | PHP_CodeSniffer\Standards\Zend\Sniffs\Files | vendor/ |
|||||
ClosingTagSniff | class | PHP_CodeSniffer\Standards\PSR2\Sniffs\Files | vendor/ |
|||||
Closure | class | PhpParser\Node\Expr | vendor/ |
|||||
ClosureComparator | final class | Prophecy\Comparator | vendor/ |
Closure comparator. | ||||
ClosureHelper | final class | Revolt\EventLoop\Internal | vendor/ |
@internal | 2 | |||
ClosureLinterSniff | class | PHP_CodeSniffer\Standards\Generic\Sniffs\Debug | vendor/ |
|||||
ClosureLoader | class | Symfony\Component\Routing\Loader | vendor/ |
ClosureLoader loads routes from a PHP closure. | ||||
ClosureLoader | class | Symfony\Component\DependencyInjection\Loader | vendor/ |
ClosureLoader loads service definitions from a PHP closure. | 2 | |||
ClosureReferenceConfigurator | class | Symfony\Component\DependencyInjection\Loader\Configurator | vendor/ |
|||||
ClosureUse | class | PhpParser\Node | vendor/ |
1 | ||||
Clover | final class | PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 2 | |||
Clover | final class | SebastianBergmann\CodeCoverage\Report | vendor/ |
1 | ||||
Coalesce | class | PhpParser\Node\Expr\BinaryOp | vendor/ |
|||||
Coalesce | class | PhpParser\Node\Expr\AssignOp | vendor/ |
|||||
Cobertura | final class | SebastianBergmann\CodeCoverage\Report | vendor/ |
1 | ||||
Cobertura | final class | PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 2 | |||
CockpitInstaller | class | Composer\Installers | vendor/ |
|||||
Code | class | PHP_CodeSniffer\Reports | vendor/ |
|||||
CodeAnalyzerSniff | class | PHP_CodeSniffer\Standards\Zend\Sniffs\Debug | vendor/ |
|||||
CodeBlock | class | Drupal\ckeditor5\Plugin\CKEditor5Plugin | core/ |
CKEditor 5 Code Block plugin configuration. | 1 | |||
CodecInterface | interface | Ramsey\Uuid\Codec | vendor/ |
A codec encodes and decodes a UUID according to defined rules | 1 | 19 | ||
CodeCoverage | final class | PHPUnit\Runner | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 3 | |||
CodeCoverage | final class | SebastianBergmann\CodeCoverage | vendor/ |
Provides collection functionality for PHP code coverage information. | 9 | |||
CodeCoverage | final class | PHPUnit\TextUI\XmlConfiguration\CodeCoverage | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 4 |