本文整理汇总了PHP中Zend_Layout::setViewSuffix方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Layout::setViewSuffix方法的具体用法?PHP Zend_Layout::setViewSuffix怎么用?PHP Zend_Layout::setViewSuffix使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Layout
的用法示例。
在下文中一共展示了Zend_Layout::setViewSuffix方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _initLayout
/**
* Инициализация объекта Layout
*
* @return Phorm_Layout
*/
protected function _initLayout()
{
$layout = new Zend_Layout();
$layout->setLayoutPath(APPLICATION_PATH . '/templates');
$layout->setViewSuffix('tpl');
return $layout;
}
示例2: testSettingViewSuffixChangesInflectorSuffix
public function testSettingViewSuffixChangesInflectorSuffix()
{
$layout = new Zend_Layout();
$inflector = $layout->getInflector();
$rules = $inflector->getRules();
$this->assertTrue(isset($rules['suffix']));
$this->assertEquals($layout->getViewSuffix(), $rules['suffix']);
$layout->setViewSuffix('php');
$this->assertEquals($layout->getViewSuffix(), $rules['suffix']);
}
示例3: setViewSuffix
/**
* Set view suffix - alias for \Zend_Layout::setViewSuffix
*
* @param string $suffix
* @return \Extlib\Mail\Message\Html
*/
public function setViewSuffix($suffix)
{
$this->layout->setViewSuffix($suffix);
return $this;
}
示例4: setLayout
/**
* Set layout
*
* @param array $config Layout config
* @access public
* @return Gene_View_Adapter Fluent interface
*/
public function setLayout()
{
$config = $this->_config;
if (is_null($config) || !is_array($config)) {
throw new Gene_View_Exception('config not found.');
}
$suffix = $this->getTemplateSuffix();
if (isset($config['contentKey'])) {
$contentKey = $config['contentKey'];
} else {
$contentKey = 'content';
}
$options = array('contentKey' => $contentKey);
if (isset($config['className'])) {
$className = $config['className'];
if (!class_exists($className, false)) {
Zend_Loader::loadClass($className);
}
$layout = new $className($options, true);
} else {
$layout = new Zend_Layout($options, true);
}
$layout->setViewSuffix($suffix);
return $this;
}