src/Adapter/FileCache.php
public function setEnabled($state = true)
    {
        $this->enabled = (bool) $state;

        if ($this->enabled) {
            try {
                $this->createNamespace();
            } catch (Exception $ex) {
                throw new RuntimeException(sprintf(
                    'Failed to enable the cache adapter of class "%s" '
                    . 'with namespace "%s".',
                    static::CLASS,
                    $this->namespace
                ), null, $ex);
            }
        }

        return $this;
    }
public function setEnabled($state = true)
    {
        $this->enabled = (bool) $state;

        if ($this->enabled) {
            try {
                $this->createNamespace();
            } catch (Exception $ex) {
                throw new RuntimeException(sprintf(
                    'Failed to enable the cache adapter of class "%s" '
                    . 'with namespace "%s".',
                    static::CLASS,
                    $this->namespace
                ), null, $ex);
            }
        }

        return $this;
    }
public function setEnabled ( $ state = true ) { $ this -> enabled = ( bool ) $ state ; if ( $ this -> enabled ) { try { $ this -> createNamespace ( ) ; } catch ( Exception $ ex ) { throw new RuntimeException ( sprintf ( 'Failed to enable the cache adapter of class "%s" ' . 'with namespace "%s".' , static :: CLASS , $ this -> namespace ) , null , $ ex ) ; } } return $ this ; }
Sets the state of adapter to "enabled state" or to "disabled state".

@param bool $state Optional; true by default. The adapter state

@throws \RuntimeException If failed to enable the cache adapter

@return self
Sets the state of adapter to enabled state or to disabled state .