src/Route.php
public function call(callable $container = null)
    {
        $this->action = $this->buildCallable($this->action, $container);

        if ($this->strategy === null) {
            return call_user_func_array($this->action, array_merge($this->defaults, $this->params));
        }

        if (!is_object($this->strategy)) {
            if ($container === null) {
                   $this->strategy = new $this->strategy;
            } else $this->strategy = $container($this->strategy);
        }

        return $this->callWithStrategy();
    }
public function call(callable $container = null)
    {
        $this->action = $this->buildCallable($this->action, $container);

        if ($this->strategy === null) {
            return call_user_func_array($this->action, array_merge($this->defaults, $this->params));
        }

        if (!is_object($this->strategy)) {
            if ($container === null) {
                   $this->strategy = new $this->strategy;
            } else $this->strategy = $container($this->strategy);
        }

        return $this->callWithStrategy();
    }
public function call ( callable $ container = null ) { $ this -> action = $ this -> buildCallable ( $ this -> action , $ container ) ; if ( $ this -> strategy === null ) { return call_user_func_array ( $ this -> action , array_merge ( $ this -> defaults , $ this -> params ) ) ; } if ( ! is_object ( $ this -> strategy ) ) { if ( $ container === null ) { $ this -> strategy = new $ this -> strategy ; } else $ this -> strategy = $ container ( $ this -> strategy ) ; } return $ this -> callWithStrategy ( ) ; }
Execute the route action, if no strategy was provided the action
will be executed by the call_user_func PHP function.

@param callable $container
@throws BadRouteException
@return mixed
Execute the route action if no strategy was provided the action will be executed by the call_user_func PHP function .