dsmithhayes / toychest
A basic dependency container.
Installs: 19
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/dsmithhayes/toychest
Requires
Requires (Dev)
- phpunit/phpunit: ^5.5
This package is not auto-updated.
Last update: 2025-10-06 17:35:01 UTC
README
An extremely basic dependency container.
Adding Dependencies
Adding a dependency to the container is easy. The ToyChest
container
implements the \ArrayAccess
SPL interface so you can treat it like an array.
<?php use ToyChest\ToyChest; use Some\ORM\Model; $container = new ToyChest(); $container['user'] = function ($container) { return new Model('User', $container['dbh']); };