src/Cache/Cache.php
public function setDriver($driver) {

    	if(false === is_string($driver)) {
    		return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($driver)), E_USER_ERROR);
    	}

        if(false === class_exists($driver)) {

            $driver = __NAMESPACE__ . '\\Driver\\' . $driver;
        
            if(false === class_exists($driver)) {
        		return trigger_error(sprintf('Driver "%s" does not exists', $driver), E_USER_ERROR);
        	}
        }

        $this -> driver = $driver;

        return $this;
    }
public function setDriver($driver) {

    	if(false === is_string($driver)) {
    		return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($driver)), E_USER_ERROR);
    	}

        if(false === class_exists($driver)) {

            $driver = __NAMESPACE__ . '\\Driver\\' . $driver;
        
            if(false === class_exists($driver)) {
        		return trigger_error(sprintf('Driver "%s" does not exists', $driver), E_USER_ERROR);
        	}
        }

        $this -> driver = $driver;

        return $this;
    }
public function setDriver ( $ driver ) { if ( false === is_string ( $ driver ) ) { return trigger_error ( sprintf ( 'Argument 1 passed to %s() must be of the type string, "%s" given' , __METHOD__ , gettype ( $ driver ) ) , E_USER_ERROR ) ; } if ( false === class_exists ( $ driver ) ) { $ driver = __NAMESPACE__ . '\\Driver\\' . $ driver ; if ( false === class_exists ( $ driver ) ) { return trigger_error ( sprintf ( 'Driver "%s" does not exists' , $ driver ) , E_USER_ERROR ) ; } } $ this -> driver = $ driver ; return $ this ; }
Sets the driver
@param string $driver
@return sFire\Cache\Cache
Sets the driver