Exemple #1
0
 /**
  * Method to add a model to the view.  We support a multiple model single
  * view system by which models are referenced by classname.
  *
  * @param   AModel  $model    The model to add to the view.
  * @param   boolean       $default  Is this the default model?
  *
  * @return  object   The added model.
  */
 public function setModel($model, $default = false)
 {
     $name = strtolower($model->getName());
     $this->_models[$name] = $model;
     if ($default) {
         $this->_defaultModel = $name;
     }
     return $model;
 }