| 1 | <?php |
||
| 7 | class InjectorConfig |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Create a new config instance |
||
| 11 | * |
||
| 12 | * @return static |
||
| 13 | */ |
||
| 14 | public static function make(Injector $injector = null) |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var Injector |
||
| 21 | */ |
||
| 22 | private $injector; |
||
| 23 | |||
| 24 | public function __construct(Injector $injector = null) |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Apply a configuration to the injector |
||
| 35 | * |
||
| 36 | * The configuration must either be callable, or be a class name that refers |
||
| 37 | * to a callable class. |
||
| 38 | * |
||
| 39 | * @param callable|string $config |
||
| 40 | * |
||
| 41 | * @return self |
||
| 42 | */ |
||
| 43 | public function apply($config) |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Apply a list of configurations to the injector |
||
| 56 | * |
||
| 57 | * @param array $configs |
||
| 58 | * |
||
| 59 | * @return self |
||
| 60 | */ |
||
| 61 | public function configure(array $configs) |
||
| 67 | |||
| 68 | /** |
||
| 69 | * Fetch the injector |
||
| 70 | * |
||
| 71 | * @return Injector |
||
| 72 | */ |
||
| 73 | public function injector() |
||
| 77 | } |
||
| 78 |