src/Registry/Common.php
protected function checkPermissions($key, $action)
    {
        if (!($action & $this->options)) {
            $originalKey = is_null($this->key) ? $key : $this->key;
            $this->key = null;
            $text = Friendlification::getConstNameByValue(
                __CLASS__, $action
            );
            throw new RuntimeException(
                is_null($key)
                    ? sprintf("%s: no permissions", $text)
                    : sprintf(
                        "%s: no permissions for key '%s'", $text,
                        $originalKey
                    ),
                $action
            );
        }
    }
protected function checkPermissions($key, $action)
    {
        if (!($action & $this->options)) {
            $originalKey = is_null($this->key) ? $key : $this->key;
            $this->key = null;
            $text = Friendlification::getConstNameByValue(
                __CLASS__, $action
            );
            throw new RuntimeException(
                is_null($key)
                    ? sprintf("%s: no permissions", $text)
                    : sprintf(
                        "%s: no permissions for key '%s'", $text,
                        $originalKey
                    ),
                $action
            );
        }
    }
protected function checkPermissions ( $ key , $ action ) { if ( ! ( $ action & $ this -> options ) ) { $ originalKey = is_null ( $ this -> key ) ? $ key : $ this -> key ; $ this -> key = null ; $ text = Friendlification :: getConstNameByValue ( __CLASS__ , $ action ) ; throw new RuntimeException ( is_null ( $ key ) ? sprintf ( "%s: no permissions" , $ text ) : sprintf ( "%s: no permissions for key '%s'" , $ text , $ originalKey ) , $ action ) ; } }
Check action permissions.

@param  string $key
@param  int $action
@return void
@throws \ReflectionException  Risen from Friendlification::getConstNameByValue().
@throws RuntimeException  If doesn't have permissions for passed action.
Check action permissions .