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 |
---|---|---|---|---|---|---|---|---|
CacheClassMetadataFactory | class | Symfony\Component\Serializer\Mapping\Factory | vendor/ |
Caches metadata using a PSR-6 implementation. | ||||
CacheClearerInterface | interface | Symfony\Component\HttpKernel\CacheClearer | vendor/ |
CacheClearerInterface. | 2 | |||
CacheCollector | abstract class | Drupal\Core\Cache | core/ |
Default implementation for CacheCollectorInterface. | 8 | 8 | ||
CacheCollectorInterface | interface | Drupal\Core\Cache | core/ |
Provides a caching wrapper to be used in place of large structures. | 3 | 2 | ||
CacheContextInterface | interface | Drupal\Core\Cache\Context | core/ |
Provides an interface for defining a cache context service. | 15 | 1 | ||
CacheContextsManager | class | Drupal\Core\Cache\Context | core/ |
Converts cache context tokens into cache keys. | 7 | |||
CacheContextsPass | class | Drupal\Core\Cache\Context | core/ |
Adds cache_contexts parameter to the container. | 1 | |||
CachedDiscoveryClearer | class | Drupal\Core\Plugin | core/ |
Defines a class which is capable of clearing the cache on plugin managers. | ||||
CachedDiscoveryClearerInterface | interface | Drupal\Core\Plugin | core/ |
Provides a way to clear static caches of all plugin managers. | 1 | |||
CachedDiscoveryInterface | interface | Drupal\Component\Plugin\Discovery | core/ |
Interface for discovery components holding a cache of plugin definitions. | 4 | 6 | ||
CachedDoubler | class | Prophecy\Doubler | vendor/ |
Cached class doubler. Prevents mirroring/creation of the same structure twice. | 1 | |||
CachedInstrumentation | final class | OpenTelemetry\API\Instrumentation | vendor/ |
Provides access to cached {@link TracerInterface} and {@link MeterInterface} instances. | ||||
CachedStorage | class | Drupal\Core\Config | core/ |
Defines the cached storage. | ||||
CacheException | interface | Psr\Cache | vendor/ |
Exception interface for all exceptions thrown by an Implementing Library. | 1 | |||
CacheFactory | class | Drupal\Core\Cache | core/ |
|||||
CacheFactoryInterface | interface | Drupal\Core\Cache | core/ |
An interface defining cache factory classes. | 10 | 2 | ||
CacheInterface | interface | Twig\Cache | vendor/ |
Interface implemented by cache classes. | 4 | 2 | ||
CacheItemInterface | interface | Psr\Cache | vendor/ |
CacheItemInterface defines an interface for interacting with objects inside a cache. | ||||
CacheItemPoolInterface | interface | Psr\Cache | vendor/ |
CacheItemPoolInterface generates CacheItemInterface objects. | 6 | |||
CachePluginBase | abstract class | Drupal\views\Plugin\views\cache | core/ |
The base plugin to handle caching. | 3 | 2 | ||
CacheRedirect | class | Drupal\Core\Cache | core/ |
Defines a value object to represent a cache redirect. | ||||
CacheRouterRebuildSubscriber | class | Drupal\Core\EventSubscriber | core/ |
Clear cache tags when the router is rebuilt. | ||||
CacheTagsChecksumInterface | interface | Drupal\Core\Cache | core/ |
Provides checksums for cache tag invalidations. | 1 | |||
CacheTagsChecksumTrait | trait | Drupal\Core\Cache | core/ |
A trait for cache tag checksum implementations. | ||||
CacheTagsInvalidator | class | Drupal\Core\Cache | core/ |
Passes cache tag events to classes that wish to respond to them. | ||||
CacheTagsInvalidatorInterface | interface | Drupal\Core\Cache | core/ |
Defines required methods for classes wanting to handle cache tag changes. | 7 | 12 | ||
CacheWarmer | final class | SebastianBergmann\CodeCoverage\StaticAnalysis | vendor/ |
1 | ||||
CacheWarmer | abstract class | Symfony\Component\HttpKernel\CacheWarmer | vendor/ |
Abstract cache warmer that knows how to write a file to the cache. | ||||
CacheWarmerAggregate | class | Symfony\Component\HttpKernel\CacheWarmer | vendor/ |
Aggregates several cache warmers into a single one. | ||||
CacheWarmerInterface | interface | Symfony\Component\HttpKernel\CacheWarmer | vendor/ |
Interface for classes able to warm up the cache. | 3 | 1 | ||
CachingFileAnalyser | final class | SebastianBergmann\CodeCoverage\StaticAnalysis | vendor/ |
@internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage | 1 | |||
CachingParser | final class | PHPUnit\Metadata\Parser | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | ||||
CachingStream | final class | GuzzleHttp\Psr7 | vendor/ |
Stream decorator that can cache previously read bytes from a sequentially read stream. | ||||
CakePHPInstaller | class | Composer\Installers | vendor/ |
|||||
CalculatedCacheContextInterface | interface | Drupal\Core\Cache\Context | core/ |
Provides an interface for defining a calculated cache context service. | 9 | 2 | ||
CalculatedPermissions | class | Drupal\Core\Session | core/ |
Represents a calculated set of permissions with cacheable metadata. | ||||
CalculatedPermissionsInterface | interface | Drupal\Core\Session | core/ |
Defines the calculated permissions interface. | 2 | |||
CalculatedPermissionsItem | class | Drupal\Core\Session | core/ |
Represents a single entry for the calculated permissions. | 1 | |||
CalculatedPermissionsItemInterface | interface | Drupal\Core\Session | core/ |
Defines the calculated permissions item interface. | 1 | |||
CalculatedPermissionsTrait | trait | Drupal\Core\Session | core/ |
Trait for \Drupal\Core\Session\CalculatedPermissionsInterface. | ||||
Calculator | abstract class | Brick\Math\Internal | vendor/ |
Performs basic operations on arbitrary size integers. | 3 | 5 | ||
Calculator | final class | SebastianBergmann\Complexity | vendor/ |
1 | ||||
CalculatorInterface | interface | Ramsey\Uuid\Math | vendor/ |
A calculator performs arithmetic operations on numbers | 1 | 5 | ||
Call | class | Prophecy\Call | vendor/ |
Call object. | 9 | |||
CallableArgumentsExtractor | final class | Twig\Util | vendor/ |
@author Fabien Potencier <fabien@symfony.com> | 2 | |||
CallableParameter | final class | phpDocumentor\Reflection\Types | vendor/ |
Value Object representing a Callable parameters. | 1 | |||
CallableResolver | class | Drupal\Core\Utility | core/ |
Resolves PHP callables. | 5 | |||
CallableString | final class | phpDocumentor\Reflection\PseudoTypes | vendor/ |
Value Object representing the type 'string'. | 1 | |||
CallableType | final class | SebastianBergmann\Type | vendor/ |
|||||
CallableTypeNode | class | PHPStan\PhpDocParser\Ast\Type | vendor/ |
7 |