Welcome Guest, Not a member yet? Register   Sign In
use active records in library
#3

Here is a template for creating a Custom Library.

PHP Code:
class Custom_Library {

    
/**
     * Class variables - public, private, protected and static.
     * --------------------------------------------------------------------
     */

    /**
     * @var
     * CI Super Object.
     *
     * Example: $this->CI->Library->Method();
     */
    
private $CI;

    
/**
     * @var
     * array ( $index => array ( $key => $val ));
     */
    
protected static $reg = array(array());

    
/**
     * __construct ()
     * --------------------------------------------------------------------
     *
     * Constructor    PHP 5+
     *
     * NOTE: Not needed if not setting values or extending a Class.
     *
     */
    
public function __construct()
    {
        
$this->CI =& get_instance();

        
log_message('debug'"Custom_Library Class Initialized");
    }


What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
use active records in library - by Valerekk - 10-21-2017, 07:10 PM
RE: use active records in library - by enlivenapp - 10-21-2017, 07:41 PM
RE: use active records in library - by Valerekk - 10-22-2017, 06:22 AM
RE: use active records in library - by InsiteFX - 10-22-2017, 03:29 AM
RE: use active records in library - by InsiteFX - 10-23-2017, 08:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB