Skip to content
A library for creating dynamic persistent configuration data [ or basically key-value pairs ;-) ] (A Code-Igniter Preference Library).
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


The ci-preference library is a library that allows you store values in a key-value pair manner. the values could be a string, integer, or an array.

To install and use in your Code Igniter project, download and install Splint, then open a terminal at the root of your intended Code Igniter distribution and run:

splint install francis94c/ci-preference

To load and use:

$params = array();
$params["file_name"] = "preferences"; // File name of the preference file.
$this->load->splint("francis94c/ci-preference", "+CIPreferences", $params, "alias");
$this->alias->get("key", "defaultVal");
$this->alias->set("key", "val");
$this->alias->increment("key1", 5) // Increments 'key1' by 5.
$this->alias->increment("key1") // increments 'key1' by 1.
$this->alias->concat("key2", "A") // Concatenates 'A' to 'key2'.
$this->alias->commit(); // Commits all values to file.
You can’t perform that action at this time.