src/ContainerFactory.php
public static function create(array $config = [])
    {
        $container = new Container();

        foreach (self::$booleanSetters as $key => $method) {
            if (isset($config[$key])) {
                $container->$method((bool) $config[$key]);
            }
        }

        foreach (self::$arraySetters as $key => $method) {
            if (isset($config[$key]) && is_array($config[$key])) {
                foreach ($config[$key] as $name => $value) {
                    $container->$method($name, $value);
                }
            }
        }

        if (isset($config[Container::CONFIG_ENTRIES]) && is_array($config[Container::CONFIG_ENTRIES])) {
            self::createEntries($container, $config[Container::CONFIG_ENTRIES]);
        }

        return $container;
    }
public static function create(array $config = [])
    {
        $container = new Container();

        foreach (self::$booleanSetters as $key => $method) {
            if (isset($config[$key])) {
                $container->$method((bool) $config[$key]);
            }
        }

        foreach (self::$arraySetters as $key => $method) {
            if (isset($config[$key]) && is_array($config[$key])) {
                foreach ($config[$key] as $name => $value) {
                    $container->$method($name, $value);
                }
            }
        }

        if (isset($config[Container::CONFIG_ENTRIES]) && is_array($config[Container::CONFIG_ENTRIES])) {
            self::createEntries($container, $config[Container::CONFIG_ENTRIES]);
        }

        return $container;
    }
public static function create ( array $ config = [ ] ) { $ container = new Container ( ) ; foreach ( self :: $ booleanSetters as $ key => $ method ) { if ( isset ( $ config [ $ key ] ) ) { $ container -> $ method ( ( bool ) $ config [ $ key ] ) ; } } foreach ( self :: $ arraySetters as $ key => $ method ) { if ( isset ( $ config [ $ key ] ) && is_array ( $ config [ $ key ] ) ) { foreach ( $ config [ $ key ] as $ name => $ value ) { $ container -> $ method ( $ name , $ value ) ; } } } if ( isset ( $ config [ Container :: CONFIG_ENTRIES ] ) && is_array ( $ config [ Container :: CONFIG_ENTRIES ] ) ) { self :: createEntries ( $ container , $ config [ Container :: CONFIG_ENTRIES ] ) ; } return $ container ; }
Static factory method to create a new container

@param array $config
@return \Phower\Container\Container
Static factory method to create a new container