FUEL CMS User Guide : Version 1.5.2


The FUEL Object Structure

FUEL CMS version 1.0 provides a powerful object oriented structure which allows you to easily access FUEL functionality within your own code. There is a fuel object set on the main CI super object (controller object accessed using the get_instance() function). This object allows access to your FUEL configuration as well as attaches other useful FUEL objects as shown below:

Basic Examples

// EXAMPLES if used in your controller
$page = $this->fuel->pages->create();
$nav = $this->fuel->navigation->render();
$this->fuel->cache->clear();
$this->fuel->assets->upload();

All the above classes inherit from the Fuel_base_library class.

Advanced Module Objects

Additionally, you have access to advanced module objects if a class exists in the advanced module's libraries folder with a naming convention of Fuel_{module}.php. The following examples assume you have the advanced modules installed:

Advanced Module Examples

$posts = $this->fuel->blog->get_posts();
$this->fuel->backup->do_backup();
$this->fuel->validate->html('mypage');
$this->fuel->tester->run();

The main fuel object is an Advanced Module object. Review the Advanced Module Reference in this user guide for a list of methods available for your installed advanced modules.

The above advanced module classes inherit from the Fuel_advanced_module class (which itself inherits from the Fuel_base_library class).