HttpExceptionNormalizerValue
class HttpExceptionNormalizerValue extends CacheableNormalization (View source)
| internal | JSON:API maintains no PHP API since its API is the HTTP API. This class may change at any time and this will break any dependencies on it. |
Helps normalize exceptions in compliance with the JSON:API spec.
Traits
Trait for \Drupal\Core\Cache\CacheableDependencyInterface.
Properties
| protected string[] | $cacheContexts | Cache contexts. |
from CacheableDependencyTrait |
| protected string[] | $cacheTags | Cache tags. |
from CacheableDependencyTrait |
| protected int | $cacheMaxAge | Cache max-age. |
from CacheableDependencyTrait |
| protected mixed | $normalization | A normalized value. |
from CacheableNormalization |
Methods
Append a value to the ArrayObject.
Sort the ArrayObject.
Exchange the current array with another array or object.
Exports the \ArrayObject to an array.
Gets the behavior flags of the \ArrayObject.
Create a new iterator from an ArrayObject instance.
Gets the class name of the array iterator that is used by \ArrayObject::getIterator().
Sort the entries by key.
Sort an array using a case insensitive "natural order" algorithm.
Sort entries using a "natural order" algorithm.
Returns whether the requested index exists.
Returns the value at the specified index.
Sets the value at the specified index to new value.
Unsets the value at the specified index.
Sets the behavior flags for the \ArrayObject.
Sets the iterator classname for the \ArrayObject.
Sort the entries with a user-defined comparison function.
Sort the entries by keys using a user-defined comparison function.
Sets cacheability; useful for value object constructors.
CacheableNormalization constructor.
Creates a CacheableNormalization instance without any special cacheability.
Gets the decorated normalization.
Converts the object to a CacheableOmission if the normalization is empty.
Gets a new CacheableNormalization with an additional dependency.
Collects an array of CacheableNormalizations into a single instance.
Ensures that no nested values are instances of this class.
Details
void
append(mixed $value)
Append a value to the ArrayObject.
bool
asort(int $flags = SORT_REGULAR)
Sort the ArrayObject.
int
count()
Count the ArrayObject.
array
exchangeArray(array|object $array)
Exchange the current array with another array or object.
array
getArrayCopy()
Exports the \ArrayObject to an array.
int
getFlags()
Gets the behavior flags of the \ArrayObject.
Iterator
getIterator()
Create a new iterator from an ArrayObject instance.
string
getIteratorClass()
Gets the class name of the array iterator that is used by \ArrayObject::getIterator().
bool
ksort(int $flags = SORT_REGULAR)
Sort the entries by key.
bool
natcasesort()
Sort an array using a case insensitive "natural order" algorithm.
bool
natsort()
Sort entries using a "natural order" algorithm.
bool
offsetExists(mixed $key)
Returns whether the requested index exists.
mixed
offsetGet(mixed $key)
Returns the value at the specified index.
void
offsetSet(mixed $key, mixed $value)
Sets the value at the specified index to new value.
void
offsetUnset(mixed $key)
Unsets the value at the specified index.
void
setFlags(int $flags)
Sets the behavior flags for the \ArrayObject.
void
setIteratorClass(string $iteratorClass)
Sets the iterator classname for the \ArrayObject.
bool
uasort(callable $callback)
Sort the entries with a user-defined comparison function.
bool
uksort(callable $callback)
Sort the entries by keys using a user-defined comparison function.
protected $this
setCacheability(CacheableDependencyInterface $cacheability)
Sets cacheability; useful for value object constructors.
getCacheTags()
{@inheritdoc}
getCacheContexts()
{@inheritdoc}
getCacheMaxAge()
{@inheritdoc}
__construct(CacheableDependencyInterface $cacheability, array|string|int|float|bool|null $normalization)
CacheableNormalization constructor.
static CacheableNormalization
permanent(array|string|int|float|bool|null $normalization)
Creates a CacheableNormalization instance without any special cacheability.
array|string|int|float|bool|null
getNormalization()
Gets the decorated normalization.
CacheableNormalization|CacheableOmission
omitIfEmpty()
Converts the object to a CacheableOmission if the normalization is empty.
CacheableNormalization
withCacheableDependency(CacheableDependencyInterface $dependency)
Gets a new CacheableNormalization with an additional dependency.
static CacheableNormalization
aggregate(array $cacheable_normalizations)
Collects an array of CacheableNormalizations into a single instance.
static protected bool
hasNoNestedInstances(array|Traversable $array)
Ensures that no nested values are instances of this class.