src/Box/Box.php
protected function _factory($definition, $params)
    {
        if (is_string($definition)) {
            if ($params) {
                $refl = new ReflectionClass($definition);
                return $refl->newInstanceArgs($params);
            } else {
                return new $definition();
            }
        }
        return call_user_func_array($definition, $params);
    }
protected function _factory($definition, $params)
    {
        if (is_string($definition)) {
            if ($params) {
                $refl = new ReflectionClass($definition);
                return $refl->newInstanceArgs($params);
            } else {
                return new $definition();
            }
        }
        return call_user_func_array($definition, $params);
    }
protected function _factory ( $ definition , $ params ) { if ( is_string ( $ definition ) ) { if ( $ params ) { $ refl = new ReflectionClass ( $ definition ) ; return $ refl -> newInstanceArgs ( $ params ) ; } else { return new $ definition ( ) ; } } return call_user_func_array ( $ definition , $ params ) ; }
Process a setted definition.

@param  mixed $definition A definition.
@param  array $params     Parameters to pass to the definition.
@return mixed
Process a setted definition .