本文整理汇总了PHP中Zend_View::headStyle方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_View::headStyle方法的具体用法?PHP Zend_View::headStyle怎么用?PHP Zend_View::headStyle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_View
的用法示例。
在下文中一共展示了Zend_View::headStyle方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setHeadStyles
/**
* Set <style> elements
*
* @return void
*/
public function setHeadStyles()
{
foreach ($this->getOptions() as $headStyle => $options) {
$content = array_key_exists('content', $options) && isset($options['content']) ? $options['content'] : null;
$placement = array_key_exists('placement', $options) && isset($options['placement']) ? $options['placement'] : 'APPEND';
$attributes = array_key_exists('attributes', $options) && isset($options['attributes']) ? $options['attributes'] : array();
$this->_view->headStyle($content, $placement, $attributes);
}
}
示例2: filter
/**
* Injects additional scripts and styles,
* that was linked to headScript after it was outputed
* This method allows to call scripts from Axis_Box
*
* @param string $pageOutput
*/
public function filter($pageOutput)
{
$head = substr($pageOutput, 0, strpos($pageOutput, '</head>'));
if (empty($head)) {
return $pageOutput;
}
$pageOutput = str_replace(array('{{headStyle}}', '{{headLink}}', '{{headScript}}'), array($this->_view->headStyle()->toString(), $this->_view->headLink()->toString(), $this->_view->headScript()->toString()), $pageOutput);
return $pageOutput;
}
示例3: _responseHtml
/**
* _responseHtml
*
* @return void
*/
private function _responseHtml()
{
$body = $this->_viewRenderer->getResponse()->getBody();
$respHeader = "{$this->_view->doctype()}\n <html>\n <head>\n {$this->_view->headMeta()}\n {$this->_view->headTitle()}\n {$this->_view->headStyle()}\n {$this->_view->headLink()}\n {$this->_view->headScript()}\n {$this->_view->dojo()}\n </head>";
$respBody = "<body>{$body}</body>";
$respFooter = "</html>";
$this->_viewRenderer->getResponse()->setBody($respHeader . $respBody . $respFooter);
}