aServices[$sName] = $oService; } /** * Get a previously registered service * * @param string $id Service id to search for * * @return mixed The service or null when the service is not found and $bMustBeFound is false * @throws \Combodo\iTop\Service\DependencyInjection\DIException */ public function get(string $id): mixed { if (!isset($this->aServices[$id])) { throw new DIException("Service ".json_encode($id)." not found"); } return $this->aServices[$id]; } public function has(string $id): bool { return isset($this->aServices[$id]); } }