My display model

As promised, here is our display model (slightly simplified):

<?php class Display extends Model { /*create the array to pass to the views*/ var $data = array(); /*two other class variables*/ var $base; var $status = ''; /*the constructor function: this calls the 'model' parent class, loads other CI libraries and helpers it requires, and dynamically sets variables*/ function Display() { parent::Model(); $this->load->helper('form'); $this->load->library('user_agent'); $this->load->library('menu'); $this->load->library('session'); /*now set the standard parts of the array*/ $this->data['css'] = $this->config->item('css'); $this->data['base'] = $this->config->item('base_url'); $this->base = $this->config->item('base_url'); $this->data['myrobots'] ...

Get CodeIgniter 1.7 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.