I have installed Wanwizard's Datamapper (http://datamapper.wanwizard.eu) in an empty codeigniter setup.
I have no problem using datamapper in my controllers, but when I try to call datamapper objects in my libraries.
I get the error: Fatal error: Class 'User' not found.
This is my code for my library:
class Auth {
protected $ci;
public function __construct()
{
$this->ci =& get_instance();
$this->ci->load->library('datamapper');
}
public function signup( $username, $email, $password )
{
$user = new User();
}
}
Does anyone know the correct way to call these datamapper objects within libraries?