alcamo / string
Objects behaving as strings
Installs: 141
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/alcamo/string
Requires
- php: 7.3 - 8.0
- alcamo/exception: ^0.1
Requires (Dev)
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: 3.*
README
Class StringObject
Class that behaves much like a string, providing implicit conversion
to string, count()
and []
operations. Useful because derived classes
can add methods to such "strings".
Class ReadonlyStringObject
Like StringObject
, but preventing any changes to the contained
string through []
operations.
Class AbstractEnum
A derived class must define a public constant VALUES
containing the
valid values. Objects of this class then behave like enumerators in
that they are guaranteed to contain one of the valid values.
Class Expander
Simple class that replaces placeholders in text, in PSR-3 and other formats.