src/Environment/FactoryEnvironment.php
static function register($environment, $name, array $aliases = array())
    {
        if (
            (is_string($environment) && !class_exists($environment)) || 
            (is_object($environment) && !$environment instanceof EnvBase)
        )
            throw new \InvalidArgumentException(sprintf(
                'Invalid Environment Provided; It must be class name or object instance of EnvBase. given: (%s).'
                , \Poirot\Std\flatten($environment)
            ));

        static::$_aliases[$name] = $environment;
        static::setAlias($name, $aliases);
    }
static function register($environment, $name, array $aliases = array())
    {
        if (
            (is_string($environment) && !class_exists($environment)) || 
            (is_object($environment) && !$environment instanceof EnvBase)
        )
            throw new \InvalidArgumentException(sprintf(
                'Invalid Environment Provided; It must be class name or object instance of EnvBase. given: (%s).'
                , \Poirot\Std\flatten($environment)
            ));

        static::$_aliases[$name] = $environment;
        static::setAlias($name, $aliases);
    }
static function register ( $ environment , $ name , array $ aliases = array ( ) ) { if ( ( is_string ( $ environment ) && ! class_exists ( $ environment ) ) || ( is_object ( $ environment ) && ! $ environment instanceof EnvBase ) ) throw new \ InvalidArgumentException ( sprintf ( 'Invalid Environment Provided; It must be class name or object instance of EnvBase. given: (%s).' , \ Poirot \ Std \ flatten ( $ environment ) ) ) ; static :: $ _aliases [ $ name ] = $ environment ; static :: setAlias ( $ name , $ aliases ) ; }
Register New Environment With Given Name

- it can override current environment with existence name

@param EnvBase|string $environment Environment instance or class name
@param string         $name        Registered Name
@param array          $aliases     Name Aliases
Register New Environment With Given Name