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 |
---|---|---|---|---|---|---|---|---|
HostSupportsRunningProcessesInterface | interface | PhpTuf\ComposerStager\API\Precondition\Service | vendor/ |
Asserts that the host can run independent PHP processes. | 1 | 2 | ||
HostTrait | trait | Symfony\Component\Routing\Loader\Configurator\Traits | vendor/ |
@internal | 2 | |||
HRTime | final class | PHPUnit\Event\Telemetry | vendor/ |
@psalm-immutable | 4 | |||
HtaccessWriter | class | Drupal\Core\File | core/ |
Provides functions to manage Apache .htaccess files. | ||||
HtaccessWriterInterface | interface | Drupal\Core\File | core/ |
Interface for managing Apache .htaccess files. | 1 | |||
Html | class | Drupal\Component\Utility | core/ |
Provides DOMDocument helpers for parsing and serializing HTML strings. | 112 | |||
Html | final class | PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 2 | |||
Html | final class | PHPUnit\TextUI\XmlConfiguration\Logging\TestDox | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 2 | |||
HTML | class | PHP_CodeSniffer\Generators | vendor/ |
|||||
Html | class | Drupal\Core\Render\Element | core/ |
Provides a render element for an entire HTML page: <html> plus its children. | ||||
HTML5 | class | Masterminds | vendor/ |
This class offers convenience methods for parsing and serializing HTML5. It is roughly designed to mirror the \DOMDocument native class. | 2 | |||
HTML5Entities | class | Masterminds\HTML5\Serializer | vendor/ |
A mapping of entities to their html5 representation. Used for older PHP versions that don't have the mapping. | ||||
HtmlCommand | class | Drupal\Core\Ajax | core/ |
AJAX command for calling the jQuery html() method. | 2 | |||
HtmlDescriptor | class | Symfony\Component\VarDumper\Command\Descriptor | vendor/ |
Describe collected data clones for html output. | 1 | |||
HtmlDumper | class | Symfony\Component\VarDumper\Dumper | vendor/ |
HtmlDumper dumps variables as HTML. | 6 | |||
HtmlDumper | final class | Twig\Profiler\Dumper | vendor/ |
@author Fabien Potencier <fabien@symfony.com> | ||||
HtmlEntityFormController | class | Drupal\Core\Entity | core/ |
Wrapping controller for entity forms that serve as the main page body. | ||||
HtmlErrorRenderer | class | Symfony\Component\ErrorHandler\ErrorRenderer | vendor/ |
@author Yonel Ceruto <yonelceruto@gmail.com> | 1 | |||
HtmlEscapedString | final class | phpDocumentor\Reflection\PseudoTypes | vendor/ |
Value Object representing the type 'string'. | 1 | |||
HtmlEscapedText | class | Drupal\Component\Render | core/ |
Escapes HTML syntax characters to HTML entities for display in markup. | 1 | |||
HtmlExtension | class | Symfony\Component\CssSelector\XPath\Extension | vendor/ |
XPath expression translator HTML extension. | 1 | |||
HtmlFormController | class | Drupal\Core\Controller | core/ |
Wrapping controller for forms that serve as the main page body. | ||||
HtmlList | class | Drupal\views\Plugin\views\style | core/ |
Style plugin to render each item in an ordered or unordered list. | ||||
HtmlOutputFormatter | class | Composer\Console | vendor/ |
@author Jordi Boggiano <j.boggiano@seld.be> | ||||
HtmlRenderer | final class | PHPUnit\Logging\TestDox | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 1 | |||
HtmlRenderer | class | Drupal\Core\Render\MainContent | core/ |
Default main content renderer for HTML requests. | ||||
HtmlResponse | class | Drupal\Core\Render | core/ |
Response that contains and can expose cacheability metadata and attachments. | 1 | 9 | ||
HtmlResponseAttachmentsProcessor | class | Drupal\Core\Render | core/ |
Processes attachments of HTML responses. | 1 | 1 | ||
HtmlResponseBigPipeSubscriber | class | Drupal\big_pipe\EventSubscriber | core/ |
Response subscriber to replace the HtmlResponse with a BigPipeResponse. | 2 | |||
HtmlResponsePlaceholderStrategySubscriber | class | Drupal\Core\EventSubscriber | core/ |
HTML response subscriber to allow for different placeholder strategies. | ||||
HtmlResponseSubscriber | class | Drupal\Core\EventSubscriber | core/ |
Response subscriber to handle HTML responses. | ||||
HTMLRestrictions | final class | Drupal\ckeditor5 | core/ |
Represents a set of HTML restrictions. | 13 | |||
HtmlSerializerRules | class | Drupal\Component\Utility | core/ |
Drupal-specific HTML5 serializer rules. | ||||
HtmlTag | class | Drupal\Core\Render\Element | core/ |
Provides a render element for any HTML tag, with properties and value. | ||||
HtmlToTextConverterInterface | interface | Symfony\Component\Mime\HtmlToTextConverter | vendor/ |
@author Fabien Potencier <fabien@symfony.com> | 2 | |||
Http4xxController | class | Drupal\system\Controller | core/ |
Controller for default HTTP 4xx responses. | ||||
HttpAsyncClient | interface | Http\Client | vendor/ |
Sends a PSR-7 Request in an asynchronous way by returning a Promise. | 1 | 7 | ||
HttpAsyncClientDiscovery | final class | Http\Discovery | vendor/ |
Finds an HTTP Asynchronous Client. | 1 | |||
HttpBrowser | class | Symfony\Component\BrowserKit | vendor/ |
An implementation of a browser using the HttpClient component to make real HTTP requests. | ||||
HttpCache | class | Symfony\Component\HttpKernel\HttpCache | vendor/ |
Cache provides HTTP caching. | 1 | |||
HttpClient | since version 2.4, use Psr\Http\Client\ClientInterface instead; see https://www.php-fig.org/psr/psr-18/ |
interface | Http\Client | vendor/ |
Provide the Httplug HttpClient interface for BC. You should typehint Psr\Http\Client\ClientInterface in new code | 1 | 4 | |
HttpClientDiscovery | This will be removed in 2.0. Consider using Psr18ClientDiscovery. |
final class | Http\Discovery | vendor/ |
Finds an HTTP Client. | |||
HttpClientKernel | final class | Symfony\Component\HttpKernel | vendor/ |
An implementation of a Symfony HTTP kernel using a "real" HTTP client. | ||||
HttpConfig | class | OpenTelemetry\API\Instrumentation\Configuration\General | vendor/ |
|||||
HttpDownloader | class | Composer\Util | vendor/ |
@author Jordi Boggiano <j.boggiano@seld.be> @phpstan-type Request array{url: non-empty-string, options: mixed[], copyTo: string|null} @phpstan-type Job array{id: int, status: int, request: Request, sync: bool, origin: string, resolve?: callable,… | 19 | |||
HttpEndpointResolver | class | OpenTelemetry\Contrib\Otlp | vendor/ |
Resolves non-signal-specific OTLP HTTP endpoints to signal-specific ones according to the specification. | ||||
HttpEndpointResolverInterface | interface | OpenTelemetry\Contrib\Otlp | vendor/ |
1 | ||||
HttpException | class | Symfony\Component\HttpKernel\Exception | vendor/ |
HttpException. | 18 | 19 | ||
HttpException | class | Http\Client\Exception | vendor/ |
Thrown when a response was received but the request itself failed. | ||||
HttpExceptionInterface | interface | Symfony\Component\HttpKernel\Exception | vendor/ |
Interface for HTTP error exceptions. | 1 | 15 |