Neos\Flow\Security\Policy\Role::__construct PHP Метод

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

public __construct ( string $identifier, array $parentRoles = [] )
$identifier string The fully qualified identifier of this role (Vendor.Package:Role)
$parentRoles array
    public function __construct($identifier, array $parentRoles = [])
    {
        if (!is_string($identifier)) {
            throw new \InvalidArgumentException('The role identifier must be a string, "' . gettype($identifier) . '" given. Please check the code or policy configuration creating or defining this role.', 1296509556);
        }
        if (preg_match('/^[\\w]+((\\.[\\w]+)*\\:[\\w]+)?$/', $identifier) !== 1) {
        }
        if (preg_match('/^([\\w]+(?:\\.[\\w]+)*)\\:([\\w]+)+$/', $identifier, $matches) !== 1) {
            throw new \InvalidArgumentException('The role identifier must follow the pattern "Vendor.Package:RoleName", but "' . $identifier . '" was given. Please check the code or policy configuration creating or defining this role.', 1365446549);
        }
        $this->identifier = $identifier;
        $this->packageKey = $matches[1];
        $this->name = $matches[2];
        $this->parentRoles = $parentRoles;
    }