PhalconRest\Api\ApiEndpoint::deny PHP Method

deny() public method

Denies access to this endpoint for role with the given names.
public deny ( ) : static
return static
    public function deny()
    {
        $roleNames = func_get_args();
        // Flatten array to allow array inputs
        $roleNames = Core::array_flatten($roleNames);
        foreach ($roleNames as $role) {
            if (!in_array($role, $this->deniedRoles)) {
                $this->deniedRoles[] = $role;
            }
        }
        return $this;
    }