本文整理汇总了PHP中StatusNet::switchSite方法的典型用法代码示例。如果您正苦于以下问题:PHP StatusNet::switchSite方法的具体用法?PHP StatusNet::switchSite怎么用?PHP StatusNet::switchSite使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StatusNet
的用法示例。
在下文中一共展示了StatusNet::switchSite方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: switchSite
/**
* Make sure we're on the right site configuration
*/
protected function switchSite()
{
if ($this->site != StatusNet::currentSite()) {
common_log(LOG_DEBUG, __METHOD__ . ": switching to site {$this->site}");
$this->stats('switch');
StatusNet::switchSite($this->site);
}
}
示例2: switchSite
/**
* Switch site, if necessary, and reset current handler assignments
* @param string $site
*/
function switchSite($site)
{
if ($site != StatusNet::currentSite()) {
$this->stats('switch');
StatusNet::switchSite($site);
$this->initialize();
}
}
示例3: recoverPassword
static function recoverPassword($email)
{
$domain = self::toDomain($email);
$sn = self::siteForDomain($domain);
if (empty($sn)) {
throw new NoSuchUserException(array('email' => $email));
}
StatusNet::switchSite($sn->nickname);
$user = User::staticGet('email', $email);
if (empty($user)) {
throw new ClientException(_('No such user.'));
}
}
示例4: checkSchema
function checkSchema()
{
$config = $this->getConfig();
Status_network::$wildcard = $config['WILDCARD'];
StatusNet::switchSite($this->nickname);
// We need to initialize the schema_version stuff to make later setup easier
$schema = array();
require INSTALLDIR . '/db/core.php';
$tableDefs = $schema;
$schema = Schema::get();
$schemaUpdater = new SchemaUpdater($schema);
foreach ($tableDefs as $table => $def) {
$schemaUpdater->register($table, $def);
}
$schemaUpdater->checkSchema();
Event::handle('CheckSchema');
}