| 1 | <?php |
||
| 11 | class RuleSetContainer implements ContainerInterface |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var \Closure[] |
||
| 15 | */ |
||
| 16 | private $rules = []; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @param array $rules |
||
| 20 | */ |
||
| 21 | 250 | public function __construct(array $rules = []) |
|
| 27 | |||
| 28 | 160 | public function get($keyword) |
|
| 36 | |||
| 37 | 162 | public function has($keyword) |
|
| 41 | |||
| 42 | /** |
||
| 43 | * Adds a rule to the container. |
||
| 44 | * |
||
| 45 | * @param string $keyword Identifier of the entry. |
||
| 46 | * @param \Closure|string $factory The closure to invoke when this entry is resolved or the FQCN. |
||
| 47 | * The closure will be given this container as the only |
||
| 48 | * argument when invoked. |
||
| 49 | */ |
||
| 50 | 250 | public function set($keyword, $factory) |
|
| 68 | } |
||
| 69 |