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