BaseService.php
system/Config/BaseService.php
1 class
13 methods
class BaseService
Services Configuration file. Services are simply other classes/libraries that the system uses to do its job. This is used by CodeIgniter to allow the core of the framework to be swapped out easily without affecting the usage within the rest of your application. This is used in place of a Dependency Injection container primarily due to its simplicity, which allows a better long-term maintenance of the applications built on top of CodeIgniter. A bonus side-effect is that IDEs are able to determine what class you are calling whereas with DI Containers there usually isn't a way for them to do this. Warning: To allow overrides by service providers do not use static calls, instead call out to \Config\Services (imported as AppServices).
get
(string $key)
set
(string $key, object $value)
override
(string $key, object $value)
getSharedInstance
(string $key, ...$params)
autoloader
(bool $getShared = true)
locator
(bool $getShared = true)
__callStatic
(string $name, array $arguments)
serviceExists
(string $name)
reset
(bool $initAutoloader = true)
resetSingle
(string $name)
injectMock
(string $name, $mock)
resetServicesCache
()
buildServicesCache
()