Utility classes and functions in Drupal 8
Same name and namespace in other branches
- 9 core/core.api.php \utility
Overview of utility classes and functions for developers.
Drupal provides developers with a variety of utility functions that make it easier and more efficient to perform tasks that are either really common, tedious, or difficult. Utility functions help to reduce code duplication and should be used in place of one-off code whenever possible.
See also
File
- core/
core.api.php, line 1568 - Documentation landing page and topics, plus core library hooks.
Classes
Name | Location | Description |
---|---|---|
Crypt |
core/ |
Utility class for cryptographically-secure string handling routines. |
DiffArray |
core/ |
Provides helpers to perform diffs on multi dimensional arrays. |
Html |
core/ |
Provides DOMDocument helpers for parsing and serializing HTML strings. |
Image |
core/ |
Provides helpers to operate on images. |
core/ |
Provides helpers to ensure emails are compliant with RFCs. | |
NestedArray |
core/ |
Provides helpers to perform operations on nested arrays and array keys of variable depth. |
Number |
core/ |
Provides helper methods for manipulating numbers. |
OpCodeCache |
core/ |
Provides helpers to handle PHP opcode caches. |
Random |
core/ |
Defines a utility class for creating random data. |
Settings |
core/ |
Read only settings that are initialized with the class. |
SortArray |
core/ |
Provides generic array sorting helper methods. |
Tags |
core/ |
Defines a class that can explode and implode tags. |
Timer |
core/ |
Provides helpers to use timers throughout a request. |
Unicode |
core/ |
Provides Unicode-related conversions and operations. |
UrlHelper |
core/ |
Helper class URL based methods. |
UserAgent |
core/ |
Provides user agent related utility functions. |
Variable |
core/ |
Provides helpers for dealing with variables. |
Xss |
core/ |
Provides helper to filter for cross-site scripting. |