class TemporaryArrayObjectThrowingExceptions

Same name in other branches
  1. 9 core/modules/jsonapi/src/Normalizer/Value/TemporaryArrayObjectThrowingExceptions.php \Drupal\jsonapi\Normalizer\Value\TemporaryArrayObjectThrowingExceptions
  2. 10 core/modules/jsonapi/src/Normalizer/Value/TemporaryArrayObjectThrowingExceptions.php \Drupal\jsonapi\Normalizer\Value\TemporaryArrayObjectThrowingExceptions

An \ArrayObject that throws an exception when used as an ArrayObject.

@internal This class implements all methods for class \ArrayObject and throws an \Exception when one of those methods is called.

Hierarchy

Expanded class hierarchy of TemporaryArrayObjectThrowingExceptions

File

core/modules/jsonapi/src/Normalizer/Value/TemporaryArrayObjectThrowingExceptions.php, line 11

Namespace

Drupal\jsonapi\Normalizer\Value
View source
class TemporaryArrayObjectThrowingExceptions extends \ArrayObject {
    
    /**
     * Append a value to the ArrayObject.
     *
     * @param mixed $value
     *   The value to append to the ArrayObject.
     *
     * @throws \Exception
     *   This class does not support this action but it must implement it, because
     *   it is extending \ArrayObject.
     */
    public function append($value) : void {
        throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \\ArrayObject.');
    }
    
    /**
     * Sort the ArrayObject.
     *
     * @param int $flags
     *   The flags to sort the ArrayObject by.
     *
     * @throws \Exception
     *   This class does not support this action but it must implement it, because
     *   it is extending \ArrayObject.
     */
    public function asort($flags = SORT_REGULAR) : true {
        throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \\ArrayObject.');
    }
    
    /**
     * Count the ArrayObject.
     *
     * @throws \Exception
     *   This class does not support this action but it must implement it, because
     *   it is extending \ArrayObject.
     */
    public function count() : int {
        throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \\ArrayObject.');
    }
    
    /**
     * Exchange the current array with another array or object.
     *
     * @param array|object $array
     *   The array to replace for the current array.
     *
     * @throws \Exception
     *   This class does not support this action but it must implement it, because
     *   it is extending \ArrayObject.
     */
    public function exchangeArray($array) : array {
        throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \\ArrayObject.');
    }
    
    /**
     * Exports the \ArrayObject to an array.
     *
     * @throws \Exception
     *   This class does not support this action but it must implement it, because
     *   it is extending \ArrayObject.
     */
    public function getArrayCopy() : array {
        throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \\ArrayObject.');
    }
    
    /**
     * Gets the behavior flags of the \ArrayObject.
     *
     * @throws \Exception
     *   This class does not support this action but it must implement it, because
     *   it is extending \ArrayObject.
     */
    public function getFlags() : int {
        throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \\ArrayObject.');
    }
    
    /**
     * Create a new iterator from an ArrayObject instance.
     *
     * @throws \Exception
     *   This class does not support this action but it must implement it, because
     *   it is extending \ArrayObject.
     */
    public function getIterator() : \Iterator {
        throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \\ArrayObject.');
    }
    
    /**
     * Gets the class name of the array iterator that is used by \ArrayObject::getIterator().
     *
     * @throws \Exception
     *   This class does not support this action but it must implement it, because
     *   it is extending \ArrayObject.
     */
    public function getIteratorClass() : string {
        throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \\ArrayObject.');
    }
    
    /**
     * Sort the entries by key.
     *
     * @param int $flags
     *   The flags to sort the ArrayObject by.
     *
     * @throws \Exception
     *   This class does not support this action but it must implement it, because
     *   it is extending \ArrayObject.
     */
    public function ksort($flags = SORT_REGULAR) : true {
        throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \\ArrayObject.');
    }
    
    /**
     * Sort an array using a case insensitive "natural order" algorithm.
     *
     * @throws \Exception
     *   This class does not support this action but it must implement it, because
     *   it is extending \ArrayObject.
     */
    public function natcasesort() : true {
        throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \\ArrayObject.');
    }
    
    /**
     * Sort entries using a "natural order" algorithm.
     *
     * @throws \Exception
     *   This class does not support this action but it must implement it, because
     *   it is extending \ArrayObject.
     */
    public function natsort() : true {
        throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \\ArrayObject.');
    }
    
    /**
     * Returns whether the requested index exists.
     *
     * @param mixed $key
     *   The index being checked.
     *
     * @throws \Exception
     *   This class does not support this action but it must implement it, because
     *   it is extending \ArrayObject.
     */
    public function offsetExists($key) : bool {
        throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \\ArrayObject.');
    }
    
    /**
     * Returns the value at the specified index.
     *
     * @param mixed $key
     *   The index with the value.
     *
     * @return mixed
     *   The value at the specified index or null.
     *
     * @throws \Exception
     *   This class does not support this action but it must implement it, because
     *   it is extending \ArrayObject.
     */
    public function offsetGet($key) : mixed {
        throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \\ArrayObject.');
    }
    
    /**
     * Sets the value at the specified index to new value.
     *
     * @param mixed $key
     *   The index being set.
     * @param mixed $value
     *   The new value for the key.
     *
     * @throws \Exception
     *   This class does not support this action but it must implement it, because
     *   it is extending \ArrayObject.
     */
    public function offsetSet($key, $value) : void {
        throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \\ArrayObject.');
    }
    
    /**
     * Unsets the value at the specified index.
     *
     * @param mixed $key
     *   The index being unset.
     *
     * @throws \Exception
     *   This class does not support this action but it must implement it, because
     *   it is extending \ArrayObject.
     */
    public function offsetUnset($key) : void {
        throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \\ArrayObject.');
    }
    
    /**
     * Sets the behavior flags for the \ArrayObject.
     *
     * @param int $flags
     *   Set the flags that change the behavior of the \ArrayObject.
     *
     * @throws \Exception
     *   This class does not support this action but it must implement it, because
     *   it is extending \ArrayObject.
     */
    public function setFlags($flags) : void {
        throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \\ArrayObject.');
    }
    
    /**
     * Sets the iterator classname for the \ArrayObject.
     *
     * @param string $iteratorClass
     *   The classname of the array iterator to use when iterating over this
     *   object.
     *
     * @throws \Exception
     *   This class does not support this action but it must implement it, because
     *   it is extending \ArrayObject.
     */
    public function setIteratorClass($iteratorClass) : void {
        throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \\ArrayObject.');
    }
    
    /**
     * Sort the entries with a user-defined comparison function.
     *
     * @param callable $callback
     *   The comparison function must return an integer less than, equal to, or
     *   greater than zero if the first argument is considered to be respectively
     *   less than, equal to, or greater than the second.
     *
     * @throws \Exception
     *   This class does not support this action but it must implement it, because
     *   it is extending \ArrayObject.
     */
    public function uasort($callback) : true {
        throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \\ArrayObject.');
    }
    
    /**
     * Sort the entries by keys using a user-defined comparison function.
     *
     * @param callable $callback
     *   The comparison function must return an integer less than, equal to, or
     *   greater than zero if the first argument is considered to be respectively
     *   less than, equal to, or greater than the second.
     *
     * @throws \Exception
     *   This class does not support this action but it must implement it, because
     *   it is extending \ArrayObject.
     */
    public function uksort($callback) : true {
        throw new \Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \\ArrayObject.');
    }

}

Members

Title Sort descending Modifiers Object type Summary
TemporaryArrayObjectThrowingExceptions::append public function Append a value to the ArrayObject.
TemporaryArrayObjectThrowingExceptions::asort public function Sort the ArrayObject.
TemporaryArrayObjectThrowingExceptions::count public function Count the ArrayObject.
TemporaryArrayObjectThrowingExceptions::exchangeArray public function Exchange the current array with another array or object.
TemporaryArrayObjectThrowingExceptions::getArrayCopy public function Exports the \ArrayObject to an array.
TemporaryArrayObjectThrowingExceptions::getFlags public function Gets the behavior flags of the \ArrayObject.
TemporaryArrayObjectThrowingExceptions::getIterator public function Create a new iterator from an ArrayObject instance.
TemporaryArrayObjectThrowingExceptions::getIteratorClass public function Gets the class name of the array iterator that is used by \ArrayObject::getIterator().
TemporaryArrayObjectThrowingExceptions::ksort public function Sort the entries by key.
TemporaryArrayObjectThrowingExceptions::natcasesort public function Sort an array using a case insensitive "natural order" algorithm.
TemporaryArrayObjectThrowingExceptions::natsort public function Sort entries using a "natural order" algorithm.
TemporaryArrayObjectThrowingExceptions::offsetExists public function Returns whether the requested index exists.
TemporaryArrayObjectThrowingExceptions::offsetGet public function Returns the value at the specified index.
TemporaryArrayObjectThrowingExceptions::offsetSet public function Sets the value at the specified index to new value.
TemporaryArrayObjectThrowingExceptions::offsetUnset public function Unsets the value at the specified index.
TemporaryArrayObjectThrowingExceptions::setFlags public function Sets the behavior flags for the \ArrayObject.
TemporaryArrayObjectThrowingExceptions::setIteratorClass public function Sets the iterator classname for the \ArrayObject.
TemporaryArrayObjectThrowingExceptions::uasort public function Sort the entries with a user-defined comparison function.
TemporaryArrayObjectThrowingExceptions::uksort public function Sort the entries by keys using a user-defined comparison function.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.