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
Name | Type | Namespace | Location | Description | Direct uses | Use statements | Strings |
---|---|---|---|---|---|---|---|
HtmlEscapedText | class |
Drupal\ |
core/ |
Escapes HTML syntax characters to HTML entities for display in markup. | 2 | ||
MarkupInterface | interface |
Drupal\ |
core/ |
Marks an object's __toString() method as returning markup. | 13 | 36 | |
MarkupTrait | trait |
Drupal\ |
core/ |
Implements MarkupInterface and Countable for rendered objects. | 8 | ||
OutputStrategyInterface | interface |
Drupal\ |
core/ |
Provides an output strategy that formats HTML strings for a given context. | 1 | ||
PlainTextOutput | class |
Drupal\ |
core/ |
Provides an output strategy for transforming HTML into simple plain text. | 12 | ||
InvalidDataTypeException | class |
Drupal\ |
core/ |
Exception thrown when a data type is invalid. | 1 | 17 | |
Json | class |
Drupal\ |
core/ |
Default serialization for JSON. | 95 | 3 | |
ObjectAwareSerializationInterface | interface |
Drupal\ |
core/ |
Ensures that a serializer is usable for serializing PHP objects. | 1 | ||
PhpSerialize | class |
Drupal\ |
core/ |
Default serialization for serialized PHP. | 3 | 2 | |
SerializationInterface | interface |
Drupal\ |
core/ |
Defines an interface for serialization formats. | 5 | 3 | |
Yaml | class |
Drupal\ |
core/ |
Provides a YAML serialization implementation using symfony/yaml. | 10 | 2 | |
YamlPecl | class |
Drupal\ |
core/ |
Provides default serialization for YAML using the PECL extension. | 1 | ||
YamlSymfony Deprecated | class |
Drupal\ |
core/ |
Default serialization for YAML using the Symfony component. | |||
PhpTransliteration | class |
Drupal\ |
core/ |
Implements transliteration without using the PECL extensions. | 1 | 4 | |
TransliterationInterface | interface |
Drupal\ |
core/ |
Defines an interface for classes providing transliteration. | 1 | 4 | |
ArgumentsResolver | class |
Drupal\ |
core/ |
Resolves the arguments to pass to a callable. | 3 | ||
ArgumentsResolverInterface | interface |
Drupal\ |
core/ |
Resolves the arguments to pass to a callable. | 1 | 1 | |
Color | class |
Drupal\ |
core/ |
Performs color conversions. | 2 | ||
Crypt | class |
Drupal\ |
core/ |
Utility class for cryptographically-secure string handling routines. | 63 | ||
DeprecatedArray | class |
Drupal\ |
core/ |
An array that triggers a deprecation warning when accessed. | |||
DeprecationHelper | final class |
Drupal\ |
core/ |
Provides a helper method for handling deprecated code paths in projects. | |||
DiffArray | class |
Drupal\ |
core/ |
Provides helpers to perform diffs on multi dimensional arrays. | 3 | ||
EmailValidator | class |
Drupal\ |
core/ |
Validates email addresses. | 1 | 2 | |
EmailValidatorInterface | interface |
Drupal\ |
core/ |
Validates email addresses. | 1 | 1 | |
Environment | class |
Drupal\ |
core/ |
Provides PHP environment helper methods. | 8 | ||
Html | class |
Drupal\ |
core/ |
Provides DOMDocument helpers for parsing and serializing HTML strings. | 141 | ||
HtmlSerializerRules | class |
Drupal\ |
core/ |
Drupal-specific HTML5 serializer rules. | |||
Image | class |
Drupal\ |
core/ |
Provides helpers to operate on images. | 1 | ||
NestedArray | class |
Drupal\ |
core/ |
Provides helpers to perform operations on nested arrays and array keys of variable depth. | 86 | ||
Number | class |
Drupal\ |
core/ |
Provides helper methods for manipulating numbers. | 3 | ||
OpCodeCache | class |
Drupal\ |
core/ |
Provides helpers to handle PHP opcode caches. | 1 | ||
Rectangle | class |
Drupal\ |
core/ |
Rectangle rotation algebra class. | 1 | ||
Reflection | final class |
Drupal\ |
core/ |
Provides helper methods for reflection. | 2 | ||
SortArray | class |
Drupal\ |
core/ |
Provides generic array sorting helper methods. | 5 | ||
Tags | class |
Drupal\ |
core/ |
Defines a class that can explode and implode tags. | 7 | ||
Timer | class |
Drupal\ |
core/ |
Provides helpers to use timers throughout a request. | 3 | ||
ToStringTrait | trait |
Drupal\ |
core/ |
Wraps __toString in a trait to avoid some fatal errors. | 2 | ||
Unicode | class |
Drupal\ |
core/ |
Provides Unicode-related conversions and operations. | 33 | ||
UrlHelper | class |
Drupal\ |
core/ |
Helper class URL based methods. | 59 | ||
UserAgent | class |
Drupal\ |
core/ |
Provides user agent related utility functions. | 2 | ||
Variable | class |
Drupal\ |
core/ |
Provides helpers for dealing with variables. | 8 | ||
Xss | class |
Drupal\ |
core/ |
Provides helper to filter for cross-site scripting. | 1 | 30 | |
Com | class |
Drupal\ |
core/ |
Generates a UUID using the Windows internal GUID extension. | 1 | ||
Pecl | class |
Drupal\ |
core/ |
Generates a UUID using the PECL extension. | 1 | ||
Php | class |
Drupal\ |
core/ |
Generates a UUID v4 (RFC 4122 section 4.4) using PHP code. | 4 | 2 | |
Uuid | class |
Drupal\ |
core/ |
UUID Helper methods. | 6 | ||
UuidInterface | interface |
Drupal\ |
core/ |
Interface for generating UUIDs. | 3 | 11 | |
Constraint | class |
Drupal\ |
core/ |
A value object representing a Drupal version constraint. | 3 | ||
AccessArgumentsResolverFactory | class |
Drupal\ |
core/ |
Resolves the arguments to pass to an access check callable. | 2 | ||
AccessArgumentsResolverFactoryInterface | interface |
Drupal\ |
core/ |
Constructs the arguments resolver instance to use when running access checks. | 1 |