CodeIgniter wrapper for YUI - CIwY 0.0.03 Beta


Ciwy Class

The Ciwy class permits to prepare the right environment for YUI components.

Initializing the Class

According with CodeIgniter, the Ciwy classe is initialized in your controller using the $this->load->library() function:

$this->load->library('ciwy');

Once loaded, the Ciwy object will be available using: $this->ciwy

Loading a CIwY component

To load a component (widget or array) to be used in CIwY, just use the $this->ciwy->loadComponent() function

$instance = $this->ciwy->loadComponent('calendar');

The function will return the name of the instance (automaticcaly generated) for the loaded component. It is possible to force the instance name.
Alternative syntax is permitted, in this case the function will return an array of istances where the key is the instance name and the value is the component name:

YUI components are automatic loaded by the CIwY component loader, if you need to load only YUI component, please see Loading a YUI component page.
See the CIwY Widget Reference and CIwY Utility Reference pages for more details.