Beispiel #1
0
 /**
  * To string conversion
  * @return string
  */
 public function __toString()
 {
     $r = implode(Zoombi::SS, $this->m_segments);
     if ($this->m_query->count() > 0) {
         $r .= Zoombi::SS . $this->queryString();
     }
     return $r;
 }
Beispiel #2
0
 /**
  * Render string
  * @param string $a_string
  * @param array $a_data
  * @param bool $a_return
  * @return mixed
  */
 protected function renderString($a_string, $a_data = array(), $a_return = false)
 {
     if (empty($a_string)) {
         return;
     }
     if ($a_data) {
         $this->setDataRef($a_data);
     }
     if ($this->m_data->count() > 0) {
         extract($this->getDataRef(), EXTR_REFS | EXTR_OVERWRITE);
     }
     ob_start();
     eval(' ?>' . $a_string . '<?php ');
     if ($a_return) {
         $echo = ob_get_contents();
         ob_end_clean();
         return $echo;
     }
     ob_end_flush();
 }