src/Core/Configurator.php
public function build($index, $default = null, $params = [])
    {
        $class = $this->get($index, $default);
        if (!class_exists($class)) {
            throw new \Exception('Class doesn\'t exist for the index : ' .$index);
        }

        $class = new \ReflectionClass($class);
        return $class->newInstanceArgs($params);
    }
public function build($index, $default = null, $params = [])
    {
        $class = $this->get($index, $default);
        if (!class_exists($class)) {
            throw new \Exception('Class doesn\'t exist for the index : ' .$index);
        }

        $class = new \ReflectionClass($class);
        return $class->newInstanceArgs($params);
    }
public function build ( $ index , $ default = null , $ params = [ ] ) { $ class = $ this -> get ( $ index , $ default ) ; if ( ! class_exists ( $ class ) ) { throw new \ Exception ( 'Class doesn\'t exist for the index : ' . $ index ) ; } $ class = new \ ReflectionClass ( $ class ) ; return $ class -> newInstanceArgs ( $ params ) ; }
Return an instantiated object

@param $index
@param null $default
@param array $params

@return object
@throws \Exception
Return an instantiated object