Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

ci-preference

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.

About

A library for creating dynamic persistent configuration data [ or basically key-value pairs ;-) ] (A Code-Igniter Preference Library).

Resources

Packages

No packages published