protected function containerFactory($container, array $containerOptions = [])
    {
        $container = ucfirst(strtolower($container));
        $className = __CLASS__.'_Container_'.$container;
        $file      = $this->getRegistry()->getPath()->get('service').
                     str_replace('_', DIRECTORY_SEPARATOR, $className).'.php';

        // Check if file exists
        // @codeCoverageIgnoreStart
        if (false === file_exists($file)) {
            throw new Doozr_Crypt_Service_Exception(
                sprintf('Container "%s" is not loadable. File "%s" does not exist!', $container, $file)
            );
        }
        // @codeCoverageIgnoreEnd

        // Include the file for the class
        include_once $file;

        // Any options set?
        return self::instantiate($className, $containerOptions);
    }
protected function containerFactory($container, array $containerOptions = [])
    {
        $container = ucfirst(strtolower($container));
        $className = __CLASS__.'_Container_'.$container;
        $file      = $this->getRegistry()->getPath()->get('service').
                     str_replace('_', DIRECTORY_SEPARATOR, $className).'.php';

        // Check if file exists
        // @codeCoverageIgnoreStart
        if (false === file_exists($file)) {
            throw new Doozr_Crypt_Service_Exception(
                sprintf('Container "%s" is not loadable. File "%s" does not exist!', $container, $file)
            );
        }
        // @codeCoverageIgnoreEnd

        // Include the file for the class
        include_once $file;

        // Any options set?
        return self::instantiate($className, $containerOptions);
    }
protected function containerFactory ( $ container , array $ containerOptions = [ ] ) { $ container = ucfirst ( strtolower ( $ container ) ) ; $ className = __CLASS__ . '_Container_' . $ container ; $ file = $ this -> getRegistry ( ) -> getPath ( ) -> get ( 'service' ) . str_replace ( '_' , DIRECTORY_SEPARATOR , $ className ) . '.php' ; // Check if file exists // @codeCoverageIgnoreStart if ( false === file_exists ( $ file ) ) { throw new Doozr_Crypt_Service_Exception ( sprintf ( 'Container "%s" is not loadable. File "%s" does not exist!' , $ container , $ file ) ) ; } // @codeCoverageIgnoreEnd // Include the file for the class include_once $ file ; // Any options set? return self :: instantiate ( $ className , $ containerOptions ) ; }
This method is intend to act as factory for container.

@param string $container        The container to create
@param array  $containerOptions The configuration/options for the container

@author Benjamin Carl <opensource@clickalicious.de>

@return Doozr_Crypt_Service_Container_Interface Container instance

@throws Doozr_Crypt_Service_Exception
This method is intend to act as factory for container .