Get the fork lift - Manage data repositories with cache and database layers in the Codeigniter framework.
- PHP >= 7.1.0
- CodeIgnitor 3.x
Install the library via composer:
composer require tfhinc/ci-warehouse
Run the post install command to publish the helper and class files to the appropriate CI directories:
composer --working-dir=vendor/tfhinc/ci-warehouse/ run-script publish-files
There are a few available options for loading the Warehouse library:
The Warehouse helper function will resolve the warehouse class via the CI instance. It will either load the class or return the existing class instance:
$this->load->helper('warehouse');
The Warehouse class can be instantiated when you require it:
$redis = new TFHInc/Warehouse/Warehouse();
The Warehouse class can be loaded like any other CI library:
$this->load->library('Warehouse');
// Use the helper method
$this->CI->load->helper('warehouse');
$books = warehouse()->load('Books');
// Use the Warehouse class
$warehouse = new TFHInc\Warehouse\Warehouse();
$books = $warehouse->load('Books');
// Use the Warehouse CI Library
$this->load->library('Warehouse');
$books = $warehouse->load('Books');
Feel free to create a GitHub issue or send a pull request with any bug fixes. Please see the GutHub issue tracker for isses that require help.
The MIT License (MIT). Please see License File for more information.