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 |
---|---|---|---|---|---|---|---|---|
TraceAttributes | interface | OpenTelemetry\SemConv | vendor/ |
2 | ||||
TraceAttributeValues | interface | OpenTelemetry\SemConv | vendor/ |
|||||
TraceConfig | class | Opentelemetry\Proto\Trace\V1 | vendor/ |
Global configuration of the trace service. All fields must be specified, or the default (zero) values will be used for each type. | ||||
TraceConfig | class | GPBMetadata\Opentelemetry\Proto\Trace\V1 | vendor/ |
|||||
TraceContextPropagator | final class | OpenTelemetry\API\Trace\Propagation | vendor/ |
TraceContext is a propagator that supports the W3C Trace Context format (https://www.w3.org/TR/trace-context/) | ||||
TraceContextValidator | class | OpenTelemetry\API\Trace\Propagation | vendor/ |
|||||
TraceFlags | interface | OpenTelemetry\API\Trace | vendor/ |
1 | ||||
TraceIdRatioBased | class | Opentelemetry\Proto\Trace\V1 | vendor/ |
Sampler that tries to uniformly sample traces with a given ratio. The ratio of sampling a trace is equal to that of the specified ratio. | ||||
TraceIdRatioBasedSampler | class | OpenTelemetry\SDK\Trace\Sampler | vendor/ |
This implementation of the SamplerInterface records with given probability. Example: ``` use OpenTelemetry\API\Trace\TraceIdRatioBasedSampler; $sampler = new TraceIdRatioBasedSampler(0.01); ``` | 1 | |||
Tracer | interface | PHPUnit\Event\Tracer | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 1 | 2 | ||
Tracer | class | OpenTelemetry\SDK\Trace | vendor/ |
|||||
TracerConfig | class | OpenTelemetry\SDK\Trace | vendor/ |
1 | ||||
TracerInterface | interface | OpenTelemetry\API\Trace | vendor/ |
2 | 3 | |||
TracerProvider | final class | OpenTelemetry\SDK\Trace | vendor/ |
|||||
TracerProviderBuilder | class | OpenTelemetry\SDK\Trace | vendor/ |
1 | ||||
TracerProviderFactory | final class | OpenTelemetry\SDK\Trace | vendor/ |
|||||
TracerProviderInterface | interface | OpenTelemetry\API\Trace | vendor/ |
@see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/specification/trace/api.md#tracerprovider | 2 | 9 | ||
TracerProviderInterface | interface | OpenTelemetry\SDK\Trace | vendor/ |
2 | 1 | |||
TracerSharedState | final class | OpenTelemetry\SDK\Trace | vendor/ |
Stores shared state/config between all { | ||||
TracesData | class | Opentelemetry\Proto\Trace\V1 | vendor/ |
TracesData represents the traces data that can be stored in a persistent storage, OR can be embedded by other protocols that transfer OTLP traces data but do not implement the OTLP protocol. The main difference between this message and collector… | ||||
TraceService | class | GPBMetadata\Opentelemetry\Proto\Collector\Trace\V1 | vendor/ |
|||||
TraceServiceClient | class | Opentelemetry\Proto\Collector\Trace\V1 | vendor/ |
Service that can be used to push spans between one Application instrumented with OpenTelemetry and a collector, or between a collector and a central collector (in this case spans are sent/received to/from multiple Applications). | ||||
TraceState | class | OpenTelemetry\API\Trace | vendor/ |
1 | ||||
TraceStateInterface | interface | OpenTelemetry\API\Trace | vendor/ |
TraceState parses and stores the tracestate header as an immutable list of string key/value pairs. It provides the following operations following the rules described in the W3C Trace Context specification: | 1 | |||
TraceStub | class | Symfony\Component\VarDumper\Caster | vendor/ |
Represents a backtrace as returned by debug_backtrace() or Exception->getTrace(). | ||||
TracingDriver | final class | Revolt\EventLoop\Driver | vendor/ |
1 | ||||
TrailingArrayCommaSniff | class | SlevomatCodingStandard\Sniffs\Arrays | vendor/ |
|||||
TraitMethodUnit | final class | SebastianBergmann\CodeUnit | vendor/ |
@psalm-immutable | ||||
TraitNameSuffixSniff | class | PHP_CodeSniffer\Standards\Generic\Sniffs\NamingConventions | vendor/ |
|||||
TraitString | final class | phpDocumentor\Reflection\PseudoTypes | vendor/ |
Value Object representing the type 'string'. | 1 | |||
TraitUnit | final class | SebastianBergmann\CodeUnit | vendor/ |
@psalm-immutable | ||||
TraitUse | class | PhpParser\Builder | vendor/ |
|||||
TraitUse | class | PhpParser\Node\Stmt | vendor/ |
1 | ||||
TraitUseAdaptation | abstract class | PhpParser\Node\Stmt | vendor/ |
|||||
TraitUseAdaptation | class | PhpParser\Builder | vendor/ |
|||||
TraitUseDeclarationSniff | class | SlevomatCodingStandard\Sniffs\Classes | vendor/ |
|||||
TraitUseSpacingSniff | class | SlevomatCodingStandard\Sniffs\Classes | vendor/ |
|||||
Trait_ | class | PhpParser\Builder | vendor/ |
|||||
Trait_ | class | PhpParser\Node\Scalar\MagicConst | vendor/ |
|||||
Trait_ | class | PhpParser\Node\Stmt | vendor/ |
3 | ||||
Transaction | class | Composer\DependencyResolver | vendor/ |
@author Nils Adermann <naderman@naderman.de> @internal | 2 | 3 | ||
Transaction | class | Drupal\Core\Database | core/ |
A wrapper class for creating and managing database transactions. | 2 | |||
TransactionCommitFailedException | class | Drupal\Core\Database | core/ |
Exception thrown when a commit() function fails. | 1 | |||
TransactionException | class | Drupal\Core\Database | core/ |
Exception thrown by an error in a database transaction. | 5 | |||
TransactionExplicitCommitNotAllowedException | class | Drupal\Core\Database | core/ |
Exception to deny attempts to explicitly manage transactions. | ||||
TransactionManager | class | Drupal\mysql\Driver\Database\mysql | core/ |
MySql implementation of TransactionManagerInterface. | ||||
TransactionManager | class | Drupal\pgsql\Driver\Database\pgsql | core/ |
PostgreSql implementation of TransactionManagerInterface. | ||||
TransactionManager | class | Drupal\sqlite\Driver\Database\sqlite | core/ |
SQLite implementation of TransactionManagerInterface. | ||||
TransactionManagerBase | abstract class | Drupal\Core\Database\Transaction | core/ |
The database transaction manager base class. | 3 | 3 | ||
TransactionManagerInterface | interface | Drupal\Core\Database\Transaction | core/ |
Interface for the database transaction manager classes. | 1 | 4 |