public function requirements($name = null)
    {
        $requirements = [
            'cacheFolderExists'     => !$this->getDefaultOption('cache_dir') || is_dir($this->getOption('cache_dir')),
            'cacheFolderIsWritable' => !$this->getDefaultOption('cache_dir') || is_writable($this->getOption('cache_dir')),
        ];

        if ($name) {
            if (!isset($requirements[$name])) {
                throw new InvalidArgumentException($name . ' is not in the requirements list (' . implode(', ', array_keys($requirements)) . ')', 19);
            }

            return $requirements[$name];
        }

        return $requirements;
    }
public function requirements($name = null)
    {
        $requirements = [
            'cacheFolderExists'     => !$this->getDefaultOption('cache_dir') || is_dir($this->getOption('cache_dir')),
            'cacheFolderIsWritable' => !$this->getDefaultOption('cache_dir') || is_writable($this->getOption('cache_dir')),
        ];

        if ($name) {
            if (!isset($requirements[$name])) {
                throw new InvalidArgumentException($name . ' is not in the requirements list (' . implode(', ', array_keys($requirements)) . ')', 19);
            }

            return $requirements[$name];
        }

        return $requirements;
    }
public function requirements ( $ name = null ) { $ requirements = [ 'cacheFolderExists' => ! $ this -> getDefaultOption ( 'cache_dir' ) || is_dir ( $ this -> getOption ( 'cache_dir' ) ) , 'cacheFolderIsWritable' => ! $ this -> getDefaultOption ( 'cache_dir' ) || is_writable ( $ this -> getOption ( 'cache_dir' ) ) , ] ; if ( $ name ) { if ( ! isset ( $ requirements [ $ name ] ) ) { throw new InvalidArgumentException ( $ name . ' is not in the requirements list (' . implode ( ', ' , array_keys ( $ requirements ) ) . ')' , 19 ) ; } return $ requirements [ $ name ] ; } return $ requirements ; }
Returns list of requirements in an array identified by keys.
For each of them, the value can be true if the requirement is
fulfilled, false else.

If a requirement name is specified, returns only the matching
boolean value for this requirement.

@param string $name

@throws \InvalidArgumentException

@return array|bool
Returns list of requirements in an array identified by keys . For each of them the value can be true if the requirement is fulfilled false else .