Thruway\Authentication\AuthorizationManager::flushAuthorizationRules PHP Метод

flushAuthorizationRules() публичный Метод

public flushAuthorizationRules ( boolean $allowByDefault = false ) : string
$allowByDefault boolean
Результат string
    public function flushAuthorizationRules($allowByDefault = false)
    {
        // $allowByDefault will be an array if it comes from a WAMP call
        if (is_array($allowByDefault) && isset($allowByDefault[0])) {
            $allowByDefault = $allowByDefault[0];
        }
        if ($allowByDefault !== true && $allowByDefault !== false) {
            return "ERROR";
        }
        $this->rules = [];
        // default startup rules
        // indexes in the rules match the role we are checking for
        // we give the longest uri precedence
        $this->rules['default'] = ["." => $allowByDefault];
        return "OK";
    }