Scalr\Acl\Resource\Definition::has PHP Method

has() public static method

Checks if specified resource is defined
public static has ( integer $resourceId ) : boolean
$resourceId integer The ID of the ACL resource
return boolean Returns true if defined or false otherwise
    public static function has($resourceId)
    {
        $list = self::getAll();
        return isset($list[$resourceId]);
    }

Usage Example

Example #1
0
 protected function validateBefore1($stage)
 {
     return defined('Scalr\\Acl\\Acl::RESOURCE_WEBHOOKS_ENVIRONMENT') && Definition::has(Acl::RESOURCE_WEBHOOKS_ENVIRONMENT);
 }
All Usage Examples Of Scalr\Acl\Resource\Definition::has