public function dispatchCallable(Dispatch $dispatch, array $arguments = null)
    {
        // Get the arguments with dependencies
        $arguments = $this->getArguments($dispatch, $arguments);

        // Attempt to dispatch the dispatch
        $response = $this->dispatchClassMethod($dispatch, $arguments)
            ?? $this->dispatchClassProperty($dispatch)
            ?? $this->dispatchClass($dispatch, $arguments)
            ?? $this->dispatchFunction($dispatch, $arguments)
            ?? $this->dispatchClosure($dispatch, $arguments);
        // TODO: Add Constant and Variable ability

        // If the response was initially null and we added the dispatched
        // text to avoid calling each subsequent dispatcher thereafter
        if ($response === $this->DISPATCHED) {
            // Reset the response to null
            $response = null;
        }

        return $response;
    }
public function dispatchCallable(Dispatch $dispatch, array $arguments = null)
    {
        // Get the arguments with dependencies
        $arguments = $this->getArguments($dispatch, $arguments);

        // Attempt to dispatch the dispatch
        $response = $this->dispatchClassMethod($dispatch, $arguments)
            ?? $this->dispatchClassProperty($dispatch)
            ?? $this->dispatchClass($dispatch, $arguments)
            ?? $this->dispatchFunction($dispatch, $arguments)
            ?? $this->dispatchClosure($dispatch, $arguments);
        // TODO: Add Constant and Variable ability

        // If the response was initially null and we added the dispatched
        // text to avoid calling each subsequent dispatcher thereafter
        if ($response === $this->DISPATCHED) {
            // Reset the response to null
            $response = null;
        }

        return $response;
    }
public function dispatchCallable ( Dispatch $ dispatch , array $ arguments = null ) { // Get the arguments with dependencies $ arguments = $ this -> getArguments ( $ dispatch , $ arguments ) ; // Attempt to dispatch the dispatch $ response = $ this -> dispatchClassMethod ( $ dispatch , $ arguments ) ?? $ this -> dispatchClassProperty ( $ dispatch ) ?? $ this -> dispatchClass ( $ dispatch , $ arguments ) ?? $ this -> dispatchFunction ( $ dispatch , $ arguments ) ?? $ this -> dispatchClosure ( $ dispatch , $ arguments ) ; // TODO: Add Constant and Variable ability // If the response was initially null and we added the dispatched // text to avoid calling each subsequent dispatcher thereafter if ( $ response === $ this -> DISPATCHED ) { // Reset the response to null $ response = null ; } return $ response ; }
Dispatch a callable.

@param Dispatch $dispatch  The dispatch
@param array    $arguments [optional] The arguments

@return mixed
Dispatch a callable .