Skip to content

Commit 21d8397

Browse files
committed
wip
1 parent afe79f7 commit 21d8397

3 files changed

Lines changed: 411 additions & 0 deletions

File tree

system/Config/BaseService.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,18 @@ public static function get(string $key): ?object
203203
return static::$instances[$key] ?? static::__callStatic($key, []);
204204
}
205205

206+
/**
207+
* Checks if a service instance has been created.
208+
*
209+
* @param string $key Identifier of the entry to check.
210+
*
211+
* @return bool True if the service instance exists, false otherwise.
212+
*/
213+
public static function has(string $key): bool
214+
{
215+
return isset(static::$instances[$key]);
216+
}
217+
206218
/**
207219
* Sets an entry.
208220
*

user_guide_src/source/concepts/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ The following pages describe the architectural concepts behind CodeIgniter4:
1414
factories
1515
http
1616
security
17+
worker_mode
1718
goals

0 commit comments

Comments
 (0)