Welcome Guest, Not a member yet? Register   Sign In
Library class
#1

[eluser]jdav3579[/eluser]
Hi,
I have a class called restc.php in my application/libraries folder.

The class is defined as:
class restc{

var $host;

function restc(){
print "in cons";
}

function browse(){
print "in browse";

}


}



in my content model, i load it
$this->load->library('restc');
$this->host="test";

When the class is initialized I get the message 'in cons',
but when I call browse(), I get a fatal message, saying call to undefined stdClass::browse() in blah/models/content.php

The variable is still accessible, but the methods of the class are not available.

any clues?

Cheers

John


Messages In This Thread
Library class - by El Forum - 12-16-2009, 05:34 PM
Library class - by El Forum - 12-16-2009, 05:43 PM
Library class - by El Forum - 12-16-2009, 06:11 PM
Library class - by El Forum - 12-17-2009, 07:21 AM
Library class - by El Forum - 12-17-2009, 12:53 PM



Theme © iAndrew 2016 - Forum software by © MyBB