public function initialize(array $config)
    {
        if (!$this->_config['key']) {
            $this->setConfig('key', Security::getSalt());
        }

        $controller = $this->_registry->getController();

        if ($controller === null) {
            $this->request = ServerRequestFactory::fromGlobals();
        }

        if (empty($this->_config['path'])) {
            $this->setConfig('path', $this->getController()->getRequest()->getAttribute('webroot'));
        }
    }
public function initialize(array $config)
    {
        if (!$this->_config['key']) {
            $this->setConfig('key', Security::getSalt());
        }

        $controller = $this->_registry->getController();

        if ($controller === null) {
            $this->request = ServerRequestFactory::fromGlobals();
        }

        if (empty($this->_config['path'])) {
            $this->setConfig('path', $this->getController()->getRequest()->getAttribute('webroot'));
        }
    }
public function initialize ( array $ config ) { if ( ! $ this -> _config [ 'key' ] ) { $ this -> setConfig ( 'key' , Security :: getSalt ( ) ) ; } $ controller = $ this -> _registry -> getController ( ) ; if ( $ controller === null ) { $ this -> request = ServerRequestFactory :: fromGlobals ( ) ; } if ( empty ( $ this -> _config [ 'path' ] ) ) { $ this -> setConfig ( 'path' , $ this -> getController ( ) -> getRequest ( ) -> getAttribute ( 'webroot' ) ) ; } }
Initialize config data and properties.

@param array $config The config data.
@return void
Initialize config data and properties .