concrete/src/Cache/Cache.php
private function buildDriver(array $driverConfig)
    {
        $class = array_get($driverConfig, 'class', '');
        if ($class && class_exists($class)) {
            $implements = class_implements($class);

            // Make sure that the provided class implements the DriverInterface
            if (isset($implements['Stash\Interfaces\DriverInterface'])) {
                /* @var \Stash\Interfaces\DriverInterface $tempDriver */

                // Only add if the driver is available
                if ($class::isAvailable()) {
                    $tempDriver = new $class(array_get($driverConfig, 'options', null));

                    return $tempDriver;
                }
            } else {
                throw new \RuntimeException('Cache driver class must implement \Stash\Interfaces\DriverInterface.');
            }
        }

        return null;
    }
private function buildDriver(array $driverConfig)
    {
        $class = array_get($driverConfig, 'class', '');
        if ($class && class_exists($class)) {
            $implements = class_implements($class);

            // Make sure that the provided class implements the DriverInterface
            if (isset($implements['Stash\Interfaces\DriverInterface'])) {
                /* @var \Stash\Interfaces\DriverInterface $tempDriver */

                // Only add if the driver is available
                if ($class::isAvailable()) {
                    $tempDriver = new $class(array_get($driverConfig, 'options', null));

                    return $tempDriver;
                }
            } else {
                throw new \RuntimeException('Cache driver class must implement \Stash\Interfaces\DriverInterface.');
            }
        }

        return null;
    }
private function buildDriver ( array $ driverConfig ) { $ class = array_get ( $ driverConfig , 'class' , '' ) ; if ( $ class && class_exists ( $ class ) ) { $ implements = class_implements ( $ class ) ; // Make sure that the provided class implements the DriverInterface if ( isset ( $ implements [ 'Stash\Interfaces\DriverInterface' ] ) ) { /* @var \Stash\Interfaces\DriverInterface $tempDriver */ // Only add if the driver is available if ( $ class :: isAvailable ( ) ) { $ tempDriver = new $ class ( array_get ( $ driverConfig , 'options' , null ) ) ; return $ tempDriver ; } } else { throw new \ RuntimeException ( 'Cache driver class must implement \Stash\Interfaces\DriverInterface.' ) ; } } return null ; }
Function used to build a driver from a driverConfig array.

@param array $driverConfig The config item belonging to the driver

@return null|\Stash\Interfaces\DriverInterface
Function used to build a driver from a driverConfig array .