Engine
Daniel Kerr edited this page Jul 11, 2017
·
79 revisions
A basic container class with only set and get methods to store library objects.
There is no need to use the registry class directly with controllers as is available via the controller and models.
$this->load->library('cache');
$this->registry->get('cache')->get('products');
// is the same as
$this->cache->get('products');
Returns the library object.
Tables | Type | Description |
---|---|---|
$key | string | gets the library object by key |
returns the library object by key
Sets a new library
Tables | Type | Description |
---|---|---|
$key | string | gets the library object by key |
$value | object | gets the library object by key |
Checks if a library is using a key
Tables | Type | Description |
---|---|---|
$key | string | gets the library object by key |
Returns if a library key is being used.
__construct(string $registry)
Tables | Type | Description |
---|---|---|
$registry | object | object registry |
-
controller(string $key, object $value)
- loads the requested controller into the registry class.
Tables | Type | Description |
---|---|---|
$registry | object | object registry |
-
model(string $key)
- loads the requested controller into the registry class. -
view(string $key, array $value)
- loads the requested view and returns the output. -
library(string $key)
- Deletes the cache by key -
helper(string $key)
- Deletes the cache by key -
config(string $key)
- Deletes the cache by key -
language(string $key)
- Deletes the cache by key
The loader class is for loading the different components of the OpenCart framework.
Action classes are used to load controllers.
$action = new Action('common/home');
$action->execute($this->registry);
Constructor.
__construct(string $registry)
Calls the requested controller. Requires the registry so it can be passed into the controller.
execute(object $registry) : mixed
OpenCart homepage | OpenCart forums | OpenCart blog | How to documents | Newsletter
OpenCart is created under the GNU General Public License version 3 (GPLv3)