Skip to content

Reference

phil/resource
TypeKindRole
Phil\Resource\ResourceReferencefinal readonly classA kind and an identifier
Phil\Resource\InvalidResourceInvalidArgumentExceptionA reference against the rules

The rules

PartRule
key, the kind1 to 64 lower-case letters, digits, _, . or -, starting with a letter
id, the identifier1 to 255 bytes, anything else free — colons included

toString() writes kind:identifier; fromString() reads it back, the first colon ending the kind, which holds none. equals() compares both parts.