本文整理汇总了PHP中Zend_View_Interface::headMeta方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_View_Interface::headMeta方法的具体用法?PHP Zend_View_Interface::headMeta怎么用?PHP Zend_View_Interface::headMeta使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_View_Interface
的用法示例。
在下文中一共展示了Zend_View_Interface::headMeta方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: expireHeader
/**
* Constructor do Helper. Utilizado para setar o quando deve-se adicionar ao timestamp da data atual.
* @param $dias
* @param $meses
* @param $anos
*/
public function expireHeader($dias = 10, $meses = 0, $anos = 0)
{
$this->timestamp = mktime(date('H'), date('i'), date('s'), date('m') + $meses, date('d') + $dias, date('Y') + $anos);
$this->view->headMeta()->appendName('expires', date('r', $this->timestamp));
$this->view->headMeta()->appendHttpEquiv('Expires', date('r', $this->timestamp));
return null;
}
示例2: getView
/**
* Retrieve view object
*
* @return Zend_View
*/
public function getView()
{
if (null === $this->_view) {
$options = $this->getOptions();
$this->_view = new Zend_View($options);
if (isset($options['doctype'])) {
$this->_view->doctype()->setDoctype(strtoupper($options['doctype']));
if (isset($options['charset']) && $this->_view->doctype()->isHtml5()) {
$this->_view->headMeta()->setCharset($options['charset']);
}
}
if (isset($options['contentType'])) {
$this->_view->headMeta()->appendHttpEquiv('Content-Type', $options['contentType']);
}
}
return $this->_view;
}
示例3: getView
/**
* Retrieve view object
*
* @return Zend_View
*/
public function getView()
{
if (null === $this->_view) {
$options = $this->getOptions();
$this->_view = new Zend_View($options);
if (isset($options['doctype'])) {
$this->_view->doctype()->setDoctype(strtoupper($options['doctype']));
if (isset($options['charset']) && $this->_view->doctype()->isHtml5()) {
$this->_view->headMeta()->setCharset($options['charset']);
}
}
if (isset($options['contentType'])) {
$this->_view->headMeta()->appendHttpEquiv('Content-Type', $options['contentType']);
}
if (isset($options['assign']) && is_array($options['assign'])) {
foreach ($options['assign'] as $key => $value) {
$this->_view->assign($key, $value);
}
}
}
return $this->_view;
}