Exemplo n.º 1
0
 /**
  * Retrieves step object
  *
  * @return	RM_Wizard_Step
  **/
 public function getStep()
 {
     if (is_null($this->_step)) {
         $this->_step = $this->_mapper->loadById('step', $this->step_id);
     }
     return $this->_step;
 }
Exemplo n.º 2
0
 /**
  * Retrieves wizard object
  *
  * @return	RM_Wizard_Object
  **/
 public function getWizard()
 {
     if (is_null($this->_wizard)) {
         $this->_wizard = $this->_mapper->loadById('wizard', $this->wizard_id);
     }
     return $this->_wizard;
 }
Exemplo n.º 3
0
 /**
  * Executes load<Entity>ById || get<Entity>List methods
  **/
 public function __call($method, $args)
 {
     if (preg_match('/load(\\w+)ById/', $method, $match)) {
         return $this->_mapper->loadById(strtolower($match[1]), $args[0]);
     } else {
         if (preg_match('/get(\\w+)List/', $method, $match)) {
             return $this->_mapper->getList(strtolower($match[1]));
         } else {
             throw new Exception("Unknown method `{$method}'");
         }
     }
 }