/**
  * Convert data to array
  * @return array
  */
 public function toArray()
 {
     $parents = array();
     foreach ($this->parents as $p) {
         $parents[] = (string) $p->getName();
     }
     if ($this->controller) {
         $parents[] = (string) $this->controller->getName();
     }
     if ($this->action) {
         $parents[] = (string) $this->action;
     }
     return $parents;
 }
 /**
  * Object setter
  * @param string $a_name
  * @param mixed $a_value
  * @return mixed
  */
 public function __set($a_name, $a_value)
 {
     if (!$this->document) {
         parent::__set($a_name, $a_value);
     }
     $this->document->{$a_name} = $a_value;
 }
 /**
  * Object setter
  * @param string $a_name
  * @param mixed $a_value
  * @return mixed
  */
 public function __set($a_name, $a_value)
 {
     if (parent::hasProperty($a_name)) {
         return parent::__set($a_name, $a_value);
     }
     $this->document->{$a_name} = $a_value;
 }
 public function _exception_handler(Exception $e)
 {
     $c = new ZController($this, 'DummyController');
     $c->render(Zoombi::fromFrameworkDir('Views' . Zoombi::DS . 'view_exception.php'), array('code' => $e->getCode(), 'message' => $e->getMessage(), 'backtrace' => $e->getTrace(), 'line' => $e->getLine(), 'file' => $e->getFile()));
     unset($c);
 }