本文整理汇总了PHP中Installer::getInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP Installer::getInstance方法的具体用法?PHP Installer::getInstance怎么用?PHP Installer::getInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Installer
的用法示例。
在下文中一共展示了Installer::getInstance方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: control
public function control()
{
$this->installer = Installer::getInstance();
if (@$_GET['step'] != 'repair') {
$this->checkForExistingInstallation();
}
//route user to the right step
if (!isset($_GET['step']) || $_GET['step'] == '1') {
$this->step1();
} elseif ($_GET['step'] == '2') {
$this->step2();
} elseif ($_GET['step'] == '3') {
$this->step3();
} elseif ($_GET['step'] == 'repair') {
$repair_what = isset($_GET['m']) ? $_GET['m'] : '';
$this->repairInstallation($repair_what);
} else {
$this->step1();
}
return $this->generateView();
}
示例2: testGetTablesToInstall
public function testGetTablesToInstall()
{
$installer = Installer::getInstance();
$tables = $installer->getTablesToInstall();
$expected_tables = array('encoded_locations', 'follower_count', 'follows', 'instances', 'links', 'owner_instances', 'owners', 'plugin_options', 'plugins', 'post_errors', 'posts', 'user_errors', 'users');
$this->assertIdentical($tables, $expected_tables);
}
示例3: testGetTablesToInstall
public function testGetTablesToInstall()
{
$installer = Installer::getInstance();
$tables = $installer->getTablesToInstall();
$expected_tables = array('encoded_locations', 'favorites', 'follower_count', 'follows', 'group_member_count', 'group_members', 'groups', 'hashtags', 'hashtags_posts', 'instances', 'instances_twitter', 'invites', 'links', 'links_short', 'mentions', 'mentions_posts', 'options', 'owner_instances', 'owners', 'places', 'places_posts', 'plugins', 'post_errors', 'posts', 'stream_data', 'stream_procs', 'user_errors', 'users');
$this->assertIdentical($tables, $expected_tables);
}
示例4: testGetTablesToInstall
public function testGetTablesToInstall()
{
$installer = Installer::getInstance();
$tables = $installer->getTablesToInstall();
$expected_tables = array('cookies', 'count_history', 'encoded_locations', 'favorites', 'follows', 'group_members', 'groups', 'hashtags', 'hashtags_posts', 'insight_baselines', 'insights', 'instances', 'instances_facebook', 'instances_hashtags', 'instances_twitter', 'invites', 'links', 'links_short', 'mentions', 'mentions_posts', 'options', 'owner_instances', 'owners', 'photos', 'places', 'places_posts', 'plugins', 'post_errors', 'posts', 'sessions', 'stream_data', 'stream_procs', 'user_errors', 'user_versions', 'users', 'videos');
$this->assertIdentical($tables, $expected_tables);
}