本文整理汇总了PHP中app\Config::siteTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP Config::siteTitle方法的具体用法?PHP Config::siteTitle怎么用?PHP Config::siteTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\Config
的用法示例。
在下文中一共展示了Config::siteTitle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
public function run()
{
$config = new Config();
$this->write("Upgrading " . $config->siteTitle() . " . . . ");
$db = new Db();
$db->install();
$this->write("Upgrade complete");
}
示例2: remind
public function remind(Request $request, Response $response, array $args)
{
$name = $request->get('name');
if ($request->get('login')) {
return new RedirectResponse($this->config->baseUrl() . '/login?name=' . $name);
}
$config = new Config();
$user = new User($this->db);
$user->loadByName($name);
$template = new Template('remind_email.twig');
if (!empty($user->getEmail())) {
$template->user = $user;
$template->token = $user->getReminder();
$message = \Swift_Message::newInstance()->setSubject('Password reminder')->setFrom(array($config->siteEmail() => $config->siteTitle()))->setTo(array($user->getEmail() => $user->getName()))->setBody($template->render(), 'text/html');
$this->email($message);
} else {
// Pause for a moment, so it's not so obvious which users' names are resulting in mail being sent.
sleep(5);
}
$template->alert('success', 'Please check your email', true);
return new RedirectResponse($this->config->baseUrl() . '/remind?name=' . $name);
}