| 1 | <?php |
||
| 18 | final class Container { |
||
| 19 | |||
| 20 | /** |
||
| 21 | * The registered services for the container. |
||
| 22 | * |
||
| 23 | * @since %VERSION% |
||
| 24 | * @var array |
||
| 25 | */ |
||
| 26 | protected $services = []; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Container constructor. |
||
| 30 | * |
||
| 31 | * @param array $services Services to register with the container. |
||
| 32 | */ |
||
| 33 | public function __construct( array $services = [] ) { |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Get the services from the container. |
||
| 39 | * |
||
| 40 | * @since %VERSION% |
||
| 41 | * @return array |
||
| 42 | */ |
||
| 43 | public function get_services() { |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Add a service to the container. |
||
| 49 | * |
||
| 50 | * @since %VERSION% |
||
| 51 | * |
||
| 52 | * @param string $service Service class name. |
||
| 53 | */ |
||
| 54 | public function add_service( $service ) { |
||
| 57 | |||
| 58 | /** |
||
| 59 | * Remove a service from the container. |
||
| 60 | * |
||
| 61 | * @since %VERSION% |
||
| 62 | * |
||
| 63 | * @param string $service Service class name. |
||
| 64 | */ |
||
| 65 | public function remove_service( $service ) { |
||
| 68 | } |