/** * Render layers (custom builds) as script tags * * @return string */ protected function _renderLayers() { $layers = $this->getLayers(); if (empty($layers)) { return ''; } $enc = 'UTF-8'; if ($this->view instanceof Zend_View_Interface && method_exists($this->view, 'getEncoding')) { $enc = $this->view->getEncoding(); } $html = array(); foreach ($layers as $path) { $html[] = sprintf('<script type="text/javascript" src="%s"></script>', htmlspecialchars($path, ENT_QUOTES, $enc)); } return implode("\n", $html); }