src/Bootstrap.php
public static function initByArray(
        array $config, array $options = [
            'registry' => Recursive::ALL_INCLUSIVE,
        ]
    )
    {
        if (!is_array($config)) {
            throw new InvalidArgumentException(
                sprintf(
                    "Passed argument isn't array (%s)",
                    gettype($config)
                ),
                self::EX_INVALID_ARG
            );
        }
        $registry = static::getRegistry($config, $options['registry']);
        // static::modifyRegistryOnStart($registry);
        $registry->set(
            'core/env', isset($_SERVER['DOCUMENT_URI']) ? "web" : "CLI"
        );
        $evtManager = new Event\Manager;
        $evtManager->setDebug($registry->get(
            'core/event/debug', false
        ));
        Log\Factory::run($registry, $evtManager);
        $registry->set('core/event/manager', $evtManager);

        return $registry;
    }
public static function initByArray(
        array $config, array $options = [
            'registry' => Recursive::ALL_INCLUSIVE,
        ]
    )
    {
        if (!is_array($config)) {
            throw new InvalidArgumentException(
                sprintf(
                    "Passed argument isn't array (%s)",
                    gettype($config)
                ),
                self::EX_INVALID_ARG
            );
        }
        $registry = static::getRegistry($config, $options['registry']);
        // static::modifyRegistryOnStart($registry);
        $registry->set(
            'core/env', isset($_SERVER['DOCUMENT_URI']) ? "web" : "CLI"
        );
        $evtManager = new Event\Manager;
        $evtManager->setDebug($registry->get(
            'core/event/debug', false
        ));
        Log\Factory::run($registry, $evtManager);
        $registry->set('core/event/manager', $evtManager);

        return $registry;
    }
public static function initByArray ( array $ config , array $ options = [ 'registry' => Recursive :: ALL_INCLUSIVE , ] ) { if ( ! is_array ( $ config ) ) { throw new InvalidArgumentException ( sprintf ( "Passed argument isn't array (%s)" , gettype ( $ config ) ) , self :: EX_INVALID_ARG ) ; } $ registry = static :: getRegistry ( $ config , $ options [ 'registry' ] ) ; // static::modifyRegistryOnStart($registry);
 $ registry -> set ( 'core/env' , isset ( $ _SERVER [ 'DOCUMENT_URI' ] ) ? "web" : "CLI" ) ; $ evtManager = new Event \ Manager ; $ evtManager -> setDebug ( $ registry -> get ( 'core/event/debug' , false ) ) ; Log \ Factory :: run ( $ registry , $ evtManager ) ; $ registry -> set ( 'core/event/manager' , $ evtManager ) ; return $ registry ; }
Initializes environment by config array.

@param  array $config
@param  array $options  Array of options:
- (int)registry - see Recursive::__construct().
@return I_Registry
@throws InvalidArgumentException
Initializes environment by config array .