Skip to content

TFHInc/ci-realredis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RealRedis

Latest Version on Packagist PHP Version Software License Total Downloads

Really Redis! - RealRedis is a wrapper library for phpredis in the Codeigniter framework.

Requirements

  • PHP >= 7.1.0
  • phpredis
  • CodeIgnitor 3.x

Installation

Install the library via composer:

composer require tfhinc/ci-realredis

Run the post install command to publish the helper and class files to the appropriate CI directories:

composer --working-dir=vendor/tfhinc/ci-realredis/ run-script publish-files

Loading the Library

There are a few available options for loading the RealRedis library:

Using the realredis() helper function

The RealRedis helper function will resolve the realredis class via the CI instance. It will either load the class or return the existing class instance:

$this->load->helper('realredis');

Using the RealRedis Class

The RealRedis class can be instantiated when you require it:

$redis = new TFHInc/RealRedis/RealRedis();

Using the RealRedis CI Library

The RealRedis class can be instantiated when you require it:

$this->load->library('RealRedis');

Usage

// Use the helper method

$this->CI->load->helper('realredis');

realredis()->get('sample.key');

// Use the RealRedis class

$realredis = new TFHInc\RealRedis\RealRedis();

$realredis->get('sample.key');

// Use the RealRedis CI Library

$this->load->library('RealRedis');

$realredis->get('sample.key');

Contributing

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.

Acknowledgements

License

The MIT License (MIT). Please see License File for more information.

About

Really Redis! - RealRedis is a wrapper library for phpredis in the Codeigniter framework

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages