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