本文整理匯總了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;
}