Welcome Guest, Not a member yet? Register   Sign In
Multiple method calls from library
#4

(This post was last modified: 11-05-2016, 02:18 PM by ManOfHonor.)

Thanks for yours reply. This is example of my library:
PHP Code:
defined('BASEPATH') OR exit('No direct script access allowed');

class 
Test extends CI_Controller
{
    protected 
$value;
        
    public function 
set($value)
    {
        
$this->value $value;
    }
        
    public function 
get()
    {
        return 
$this->value;
    }


InsiteFX, do you mean something like this:
PHP Code:
defined('BASEPATH') OR exit('No direct script access allowed');

class 
Test extends CI_Controller
{
    protected static 
$value;
        
    public function 
set($value)
    {
        
self::$value $value;
    }
        
    public function 
get()
    {
        return 
self::$value;
    }

    public function 
clear()
    {
        
self::value '';
    }

Reply


Messages In This Thread
RE: Multiple method calls from library - by ManOfHonor - 11-05-2016, 02:13 PM



Theme © iAndrew 2016 - Forum software by © MyBB