CodeIgniter Forums
Calling functions inside library - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Calling functions inside library (/thread-45495.html)



Calling functions inside library - El Forum - 09-23-2011

[eluser]Unknown[/eluser]
I have a library looking like this

class Anylibrary {
private $CI;

public function __construct()
{

$this->CI =& get_instance();


}

public function test()
{

echo $this->CI->hello();

}

public function hello() {

return "hello world";
}

}


I am not able to call function Hello from inside function test. Any ideas why?