protected function init()
    {

        $this->prependOptions([
            'path' => './cache',
            'formatAliases' => [],
            'format' => 'json'
        ]);

        $this->_path = $this->getOption('path');
        $this->_formatFactory = new Factory(__NAMESPACE__.'\\File\\FormatBase', [
            'json'      => __NAMESPACE__.'\\File\\Format\\Json',
            'serialize' => __NAMESPACE__.'\\File\\Format\\Serialize',
            'export'    => __NAMESPACE__.'\\File\\Format\\Export'
        ]);

        $this->_formatFactory->registerAliases($this->getOption('formatAliases'));

        $this->_format = $this->_formatFactory->createInstance($this->getOption('format'));
        $this->_lifeTimePath = implode('', [$this->_path, '/.life-times', $this->_format->getExtension()]);
        $this->_lifeTimes = [];

        if (file_exists($this->_lifeTimePath))
            $this->_lifeTimes = $this->_format->load($this->_lifeTimePath);
    }
protected function init()
    {

        $this->prependOptions([
            'path' => './cache',
            'formatAliases' => [],
            'format' => 'json'
        ]);

        $this->_path = $this->getOption('path');
        $this->_formatFactory = new Factory(__NAMESPACE__.'\\File\\FormatBase', [
            'json'      => __NAMESPACE__.'\\File\\Format\\Json',
            'serialize' => __NAMESPACE__.'\\File\\Format\\Serialize',
            'export'    => __NAMESPACE__.'\\File\\Format\\Export'
        ]);

        $this->_formatFactory->registerAliases($this->getOption('formatAliases'));

        $this->_format = $this->_formatFactory->createInstance($this->getOption('format'));
        $this->_lifeTimePath = implode('', [$this->_path, '/.life-times', $this->_format->getExtension()]);
        $this->_lifeTimes = [];

        if (file_exists($this->_lifeTimePath))
            $this->_lifeTimes = $this->_format->load($this->_lifeTimePath);
    }
protected function init ( ) { $ this -> prependOptions ( [ 'path' => './cache' , 'formatAliases' => [ ] , 'format' => 'json' ] ) ; $ this -> _path = $ this -> getOption ( 'path' ) ; $ this -> _formatFactory = new Factory ( __NAMESPACE__ . '\\File\\FormatBase' , [ 'json' => __NAMESPACE__ . '\\File\\Format\\Json' , 'serialize' => __NAMESPACE__ . '\\File\\Format\\Serialize' , 'export' => __NAMESPACE__ . '\\File\\Format\\Export' ] ) ; $ this -> _formatFactory -> registerAliases ( $ this -> getOption ( 'formatAliases' ) ) ; $ this -> _format = $ this -> _formatFactory -> createInstance ( $ this -> getOption ( 'format' ) ) ; $ this -> _lifeTimePath = implode ( '' , [ $ this -> _path , '/.life-times' , $ this -> _format -> getExtension ( ) ] ) ; $ this -> _lifeTimes = [ ] ; if ( file_exists ( $ this -> _lifeTimePath ) ) $ this -> _lifeTimes = $ this -> _format -> load ( $ this -> _lifeTimePath ) ; }
Initializes the file cache adapter
Initializes the file cache adapter