public function _render($data = array()) { if (browser::is_gecko()) { $browser = "gecko"; } if (browser::is_safari()) { $browser = "webkit"; } if (browser::is_iphone()) { $browser = "iphone"; } if (browser::is_ie()) { if (browser::is_ie(9)) { $browser = "ie ie9"; } elseif (browser::is_ie(8)) { $browser = "ie ie8"; } elseif (browser::is_ie(7)) { $browser = "ie ie7"; } elseif (browser::is_ie(6)) { $browser = "ie ie6"; } else { $browser = "ie"; } } $data['browser'] = $browser; $data['controller'] = Router::$controller; $data['method'] = Router::$method; $data['title'] = $this->title; $data['contents'] = $this->html; $data['stylesheets'] = $this->stylesheets; $data['jscripts'] = $this->jscripts; $data = array_merge($data, self::$data, $this->template); // Tack on our output to Eight's output buffer Eight::$output .= View::factory($this->wrapper, $data)->render(); }
public function _render($data = array()) { if (browser::is_gecko()) { $browser = "gecko"; } if (browser::is_safari()) { $browser = "webkit"; } if (browser::is_iphone()) { $browser = "iphone"; } if (browser::is_ie()) { if (browser::is_ie(9)) { $browser = "ie ie9"; } elseif (browser::is_ie(8)) { $browser = "ie ie8"; } elseif (browser::is_ie(7)) { $browser = "ie ie7"; } elseif (browser::is_ie(6)) { $browser = "ie ie6"; } else { $browser = "ie"; } } $data['browser'] = $browser; $data['controller'] = Router::$controller; $data['method'] = Router::$method; $data['title'] = $this->title; $data['contents'] = $this->html; $data['stylesheets'] = $this->stylesheets; $data['jscripts'] = $this->jscripts; // Check for variable conflicts if (count($conflicts = array_intersect_key($data, $this->template)) > 0) { throw new Eight_Exception('The following variable(s) are already in use by the Controller_Template::_render() method and can NOT be used: ' . implode(',', array_keys($conflicts))); } // Safely merge data $data = array_merge($data, $this->template); // Tack on our output to Eight's output buffer Eight::$output .= View::factory($this->wrapper, $data)->render(); }