protected function actionExists($object, $action, $method = '', $special = false) {
        if ($special && in_array($action, self::$specialActions)) {
            return '';
        }

        // Short circuit on a badly named action.
        if (!$this->isIdentifier($action)) {
            return '';
        }

        if ($method && $method !== $action) {
            $calledAction = $method.$action;
            if (Event::methodExists($object, $calledAction)) {
                return $calledAction;
            }
        }
        $calledAction = $action;
        if (Event::methodExists($object, $calledAction)) {
            return $calledAction;
        }
        return '';
    }
protected function actionExists($object, $action, $method = '', $special = false) {
        if ($special && in_array($action, self::$specialActions)) {
            return '';
        }

        // Short circuit on a badly named action.
        if (!$this->isIdentifier($action)) {
            return '';
        }

        if ($method && $method !== $action) {
            $calledAction = $method.$action;
            if (Event::methodExists($object, $calledAction)) {
                return $calledAction;
            }
        }
        $calledAction = $action;
        if (Event::methodExists($object, $calledAction)) {
            return $calledAction;
        }
        return '';
    }
protected function actionExists ( $ object , $ action , $ method = '' , $ special = false ) { if ( $ special && in_array ( $ action , self :: $ specialActions ) ) { return '' ; } // Short circuit on a badly named action. if ( ! $ this -> isIdentifier ( $ action ) ) { return '' ; } if ( $ method && $ method !== $ action ) { $ calledAction = $ method . $ action ; if ( Event :: methodExists ( $ object , $ calledAction ) ) { return $ calledAction ; } } $ calledAction = $ action ; if ( Event :: methodExists ( $ object , $ calledAction ) ) { return $ calledAction ; } return '' ; }
Tests whether a controller action exists.

@param object $object The controller object that the method should be on.
@param string $action The name of the action.
@param string $method The http method.
@param bool $special Whether or not to blacklist the special methods.
@return string Returns the name of the action method or an empty string if it doesn't exist.
Tests whether a controller action exists .