main
Robert 1 month ago
parent 413175fde6
commit a9995970f3
  1. 10
      src/bootstrap/main.php

@ -164,6 +164,16 @@ final class di {
protected $services = [];
// alias to register
public function set(...$args): void {
$this->register(...$args);
}
// alias to get_service
public function get(...$args) {
return $this->get_service(...$args);
}
public function register(string $service_name, callable $callable): void {
$this->services[$service_name] = $callable;
}

Loading…
Cancel
Save