src/Control/RequestHandler.php
public function allowedActions($limitToClass = null)
    {
        if ($limitToClass) {
            $actions = Config::forClass($limitToClass)->get('allowed_actions', true);
        } else {
            $actions = $this->config()->get('allowed_actions');
        }

        if (is_array($actions)) {
            if (array_key_exists('*', $actions)) {
                throw new InvalidArgumentException("Invalid allowed_action '*'");
            }

            // convert all keys and values to lowercase to
            // allow for easier comparison, unless it is a permission code
            $actions = array_change_key_case($actions, CASE_LOWER);

            foreach ($actions as $key => $value) {
                if (is_numeric($key)) {
                    $actions[$key] = strtolower($value);
                }
            }

            return $actions;
        } else {
            return null;
        }
    }
public function allowedActions($limitToClass = null)
    {
        if ($limitToClass) {
            $actions = Config::forClass($limitToClass)->get('allowed_actions', true);
        } else {
            $actions = $this->config()->get('allowed_actions');
        }

        if (is_array($actions)) {
            if (array_key_exists('*', $actions)) {
                throw new InvalidArgumentException("Invalid allowed_action '*'");
            }

            // convert all keys and values to lowercase to
            // allow for easier comparison, unless it is a permission code
            $actions = array_change_key_case($actions, CASE_LOWER);

            foreach ($actions as $key => $value) {
                if (is_numeric($key)) {
                    $actions[$key] = strtolower($value);
                }
            }

            return $actions;
        } else {
            return null;
        }
    }
public function allowedActions ( $ limitToClass = null ) { if ( $ limitToClass ) { $ actions = Config :: forClass ( $ limitToClass ) -> get ( 'allowed_actions' , true ) ; } else { $ actions = $ this -> config ( ) -> get ( 'allowed_actions' ) ; } if ( is_array ( $ actions ) ) { if ( array_key_exists ( '*' , $ actions ) ) { throw new InvalidArgumentException ( "Invalid allowed_action '*'" ) ; } // convert all keys and values to lowercase to // allow for easier comparison, unless it is a permission code $ actions = array_change_key_case ( $ actions , CASE_LOWER ) ; foreach ( $ actions as $ key => $ value ) { if ( is_numeric ( $ key ) ) { $ actions [ $ key ] = strtolower ( $ value ) ; } } return $ actions ; } else { return null ; } }
Get a array of allowed actions defined on this controller,
any parent classes or extensions.

Caution: Since 3.1, allowed_actions definitions only apply
to methods on the controller they're defined on,
so it is recommended to use the $class argument
when invoking this method.

@param string $limitToClass
@return array|null
Get a array of allowed actions defined on this controller any parent classes or extensions .