Authority\Rule::matchesResource PHP Method

matchesResource() public method

Determine if the instance's resource matches the one passed in
public matchesResource ( string | mixed $resource ) : boolean
$resource string | mixed Name of resource or instance of object
return boolean
    public function matchesResource($resource)
    {
        $resource = is_object($resource) ? get_class($resource) : $resource;
        return $this->resource === $resource || $this->resource === 'all';
    }