public function optimizeHeadLink() { $registry = Zend_Registry::getInstance(); if (!$registry->isRegistered('headLink')) { return $this; } foreach ($registry->headLink ? $registry->headLink : array() as $index => $value) { switch (true) { case 0 === strpos($index, 'file'): $this->appendStylesheet(Base_Controller_Helper_Path2Url::getInstance()->direct($value)); break; } } return $this; }
public function optimizeHeadScript() { $registry = Zend_Registry::getInstance(); $content = ''; if (!$registry->isRegistered('headScript')) { return $this; } foreach ($registry->headScript ? $registry->headScript : array() as $index => $value) { switch (true) { case 0 === strpos($index, 'file'): $this->appendFile(Base_Controller_Helper_Path2Url::getInstance()->direct($value)); break; case 0 === strpos($index, 'inline'): $this->appendScript(';' . PHP_EOL . ';' . $value); break; } } return $this; }