本文整理汇总了PHP中Phalcon\Tag::setTitleSeparator方法的典型用法代码示例。如果您正苦于以下问题:PHP Tag::setTitleSeparator方法的具体用法?PHP Tag::setTitleSeparator怎么用?PHP Tag::setTitleSeparator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Phalcon\Tag
的用法示例。
在下文中一共展示了Tag::setTitleSeparator方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testSetTitleSeparator
public function testSetTitleSeparator()
{
Tag::setTitle('Title');
Tag::appendTitle('Class');
$this->assertEquals(Tag::getTitle(), '<title>TitleClass</title>' . PHP_EOL);
Tag::setTitle('Title');
Tag::setTitleSeparator('|');
Tag::appendTitle('Class');
$this->assertEquals(Tag::getTitle(), '<title>Title|Class</title>' . PHP_EOL);
$this->assertEquals(Tag::getTitleSeparator(), '|');
Tag::setTitle('Title');
Tag::setTitleSeparator('|');
Tag::prependTitle('Class');
$this->assertEquals(Tag::getTitle(), '<title>Class|Title</title>' . PHP_EOL);
}
示例2: initialize
public function initialize()
{
$this->view->setTemplateAfter('main');
Tag::setTitle('财途网');
Tag::setTitleSeparator(' - ');
$this->_initLibrary();
$this->_initSiteConfig();
$this->_initParams();
$this->_initMenu();
$actionName = $this->dispatcher->getActionName();
$controllName = $this->dispatcher->getHandlerClass();
$dispatcher = $controllName . '-' . $actionName;
$this->_initPageTitle($dispatcher);
$this->_initMetaData($dispatcher);
$this->view->setVar("server", $_SERVER);
$this->view->setVar("bdtongji", true);
}
示例3: setTitleSeparator
public static function setTitleSeparator($titleSeparator)
{
parent::setTitleSeparator($titleSeparator);
}
示例4: function
});
/**
* If the configuration specify the use of metadata adapter use it or use memory otherwise
*/
$di->set('modelsMetadata', function () {
return new MetaData();
});
/**
* Start the session the first time some component request the session service
*/
$di->set('session', function () {
$session = new SessionAdapter();
$session->start();
return $session;
});
/**
* Register the flash service with custom CSS classes
*/
$di->set('flash', function () {
return new FlashSession(array('error' => 'alert alert-danger', 'success' => 'alert alert-success', 'notice' => 'alert alert-info'));
});
/**
* Register a user component
*/
$di->set('helpers', function () {
return new Helpers();
});
$di->set('tag', function () {
Tag::setTitleSeparator(" | ");
return new Tag();
});