public function setAction($action)
    {
        if (!is_string($action) && !is_callable($action)) {
            throw new \LogicException(sprintf('Route action given "%s" is invalid. String or Callable expected.', gettype($action)));
        }
        $this->action = $action;
        
        return $this;
    }
public function setAction($action)
    {
        if (!is_string($action) && !is_callable($action)) {
            throw new \LogicException(sprintf('Route action given "%s" is invalid. String or Callable expected.', gettype($action)));
        }
        $this->action = $action;
        
        return $this;
    }
public function setAction ( $ action ) { if ( ! is_string ( $ action ) && ! is_callable ( $ action ) ) { throw new \ LogicException ( sprintf ( 'Route action given "%s" is invalid. String or Callable expected.' , gettype ( $ action ) ) ) ; } $ this -> action = $ action ; return $ this ; }
Set action callback

@param string|\callable $action
@return Route
@throws \LogicException
Set action callback