src/TerminalObject/Router/Router.php
protected function getObject($router, $name, $arguments)
    {
        $obj = $router->path($name);

        if (is_string($obj)) {
            $obj = (new \ReflectionClass($obj))->newInstanceArgs($arguments);
        }

        if (method_exists($obj, 'arguments')) {
            call_user_func_array([$obj, 'arguments'], $arguments);
        }

        return $obj;
    }
protected function getObject($router, $name, $arguments)
    {
        $obj = $router->path($name);

        if (is_string($obj)) {
            $obj = (new \ReflectionClass($obj))->newInstanceArgs($arguments);
        }

        if (method_exists($obj, 'arguments')) {
            call_user_func_array([$obj, 'arguments'], $arguments);
        }

        return $obj;
    }
protected function getObject ( $ router , $ name , $ arguments ) { $ obj = $ router -> path ( $ name ) ; if ( is_string ( $ obj ) ) { $ obj = ( new \ ReflectionClass ( $ obj ) ) -> newInstanceArgs ( $ arguments ) ; } if ( method_exists ( $ obj , 'arguments' ) ) { call_user_func_array ( [ $ obj , 'arguments' ] , $ arguments ) ; } return $ obj ; }
Get the object whether it's a string or already instantiated

@param \League\CLImate\TerminalObject\Router\RouterInterface $router
@param string $name
@param array $arguments

@return \League\CLImate\TerminalObject\Dynamic\DynamicTerminalObjectInterface|\League\CLImate\TerminalObject\Basic\BasicTerminalObjectInterface
Get the object whether it s a string or already instantiated