reekoheek / util
php common utility library
Installs: 2 612
Dependents: 5
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- reekoheek/jsonkit: ~1.0.0
Requires (Dev)
README
PHP Common Utility Library
Collection
Collection is an object that wrap associative array, and work like an associative array.
Collection is json serializer aware. See, JsonKit.
Example
use ROH\Util\Collection; // instantiate empty collection $collection = new Collection(); // instantiate filled collection $filledCollection = new Collection([ 'foo' => 'bar' ]); // define attribute $collection['subCollection'] = $filledCollection; // get foo of sub collection attribute from parent collection attribute echo $collection['subCollection']['foo'];
Composition
Compose array of callable / function to be called later as sequence of function call.
Inflector
Inflection library
Injector
Simple dependency injector
Options
Compose options from array, or configuration files
StringFormatter
Format string from string template