public get ( string $id, boolean $throwException = true ) : object | null | ||
$id | string | component ID (e.g. `db`). |
$throwException | boolean | whether to throw an exception if `$id` is not registered with the locator before. |
return | object | null | the component of the specified ID. If `$throwException` is false and `$id` is not registered before, null will be returned. |