/** * Get route string as mixed url string * @return string */ public function toMixedUrl() { $arr = array(); if (!empty($this->m_path->module)) { $arr[] = $this->m_path->module; } if (!empty($this->m_path->controller)) { $arr[] = $this->m_path->controller; } if (!empty($this->m_path->action)) { $arr[] = $this->m_path->action; } foreach ($this->m_param->getData() as $d) { $arr[] = $d; } $o = implode(Zoombi::SS, $arr); if ($this->m_query->count() < 1) { return strval($o); } $arr = array(); foreach ($this->m_query->getData() as $k => $v) { $arr[] = "{$k}={$v}"; } return $o . Zoombi::SS . '?' . implode('&', $arr); }
/** * 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; }
/** * 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(); }
/** * Get count values of cookie array * @return string */ public function countCookie() { return $this->cookie->count(); }