在CodeIgniter中创建类的实例

Without using CodeIgniter I would normally just do;

require_once("object");

test = new object();

How would I go about doing this in CodeIgniter?

Edit: for example this class could be a video game object. It might be holding a number of variables, for example title, age,description etc. There would also be variable get/set methods for the above variables.

For example, I might use this class to help contain the information created by a database search.

Codeigniter uses the Singleton design pattern and most of your classes are loaded using the loader class (as needed, in a constructor, or in the autoload config file) and are then available via the Codeigniter Super Object $this->my_model. As Kai Qing noted, using a Model would typically entail:

// In the constructor, controller method, or autoload
$this->load->model('my_model');

// Then to use a method simply
$this->my_model->my_method();

In Codeigniter classes are more like utility classes to group like functionality. However, you can always use native PHP in Codeigniter to require a class and then instantiate your own objects.