当前位置: 首页>>代码示例>>PHP>>正文


PHP PhabricatorLiskDAO::getDefaultStorageNamespace方法代码示例

本文整理汇总了PHP中PhabricatorLiskDAO::getDefaultStorageNamespace方法的典型用法代码示例。如果您正苦于以下问题:PHP PhabricatorLiskDAO::getDefaultStorageNamespace方法的具体用法?PHP PhabricatorLiskDAO::getDefaultStorageNamespace怎么用?PHP PhabricatorLiskDAO::getDefaultStorageNamespace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PhabricatorLiskDAO的用法示例。


在下文中一共展示了PhabricatorLiskDAO::getDefaultStorageNamespace方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: buildSchemaQuery

 protected function buildSchemaQuery()
 {
     $ref = PhabricatorDatabaseRef::getMasterDatabaseRef();
     $api = id(new PhabricatorStorageManagementAPI())->setUser($ref->getUser())->setHost($ref->getHost())->setPort($ref->getPort())->setNamespace(PhabricatorLiskDAO::getDefaultStorageNamespace())->setPassword($ref->getPass());
     $query = id(new PhabricatorConfigSchemaQuery())->setAPI($api);
     return $query;
 }
开发者ID:rchicoli,项目名称:phabricator,代码行数:7,代码来源:PhabricatorConfigDatabaseController.php

示例2: buildSchemaQuery

 protected function buildSchemaQuery()
 {
     $conf = PhabricatorEnv::newObjectFromConfig('mysql.configuration-provider', array($dao = null, 'w'));
     $api = id(new PhabricatorStorageManagementAPI())->setUser($conf->getUser())->setHost($conf->getHost())->setPort($conf->getPort())->setNamespace(PhabricatorLiskDAO::getDefaultStorageNamespace())->setPassword($conf->getPassword());
     $query = id(new PhabricatorConfigSchemaQuery())->setAPI($api);
     return $query;
 }
开发者ID:truSense,项目名称:phabricator,代码行数:7,代码来源:PhabricatorConfigDatabaseController.php

示例3: getAPI

 private function getAPI(PhabricatorDatabaseRef $ref)
 {
     $key = $ref->getRefKey();
     if (isset($this->apis[$key])) {
         return $this->apis[$key];
     }
     return id(new PhabricatorStorageManagementAPI())->setUser($ref->getUser())->setHost($ref->getHost())->setPort($ref->getPort())->setNamespace(PhabricatorLiskDAO::getDefaultStorageNamespace())->setPassword($ref->getPass());
 }
开发者ID:NeoArmageddon,项目名称:phabricator,代码行数:8,代码来源:PhabricatorConfigSchemaQuery.php

示例4: array

**storage** __workflow__ [__options__]
Manage Phabricator database storage and schema versioning.

**storage** upgrade
Initialize or upgrade Phabricator storage.

**storage** upgrade --user __root__ --password __hunter2__
Use administrative credentials for schema changes.
EOHELP
);
$args->parseStandardArguments();
$conf = PhabricatorEnv::newObjectFromConfig('mysql.configuration-provider', array($dao = null, 'w'));
$default_user = $conf->getUser();
$default_host = $conf->getHost();
$default_port = $conf->getPort();
$default_namespace = PhabricatorLiskDAO::getDefaultStorageNamespace();
try {
    $args->parsePartial(array(array('name' => 'force', 'short' => 'f', 'help' => pht('Do not prompt before performing dangerous operations.')), array('name' => 'user', 'short' => 'u', 'param' => 'username', 'default' => $default_user, 'help' => pht("Connect with __username__ instead of the configured default ('%s').", $default_user)), array('name' => 'password', 'short' => 'p', 'param' => 'password', 'help' => pht('Use __password__ instead of the configured default.')), array('name' => 'namespace', 'param' => 'name', 'default' => $default_namespace, 'help' => pht("Use namespace __namespace__ instead of the configured " . "default ('%s'). This is an advanced feature used by unit tests; " . "you should not normally use this flag.", $default_namespace)), array('name' => 'dryrun', 'help' => pht('Do not actually change anything, just show what would be changed.')), array('name' => 'disable-utf8mb4', 'help' => pht('Disable utf8mb4, even if the database supports it. This is an ' . 'advanced feature used for testing changes to Phabricator; you ' . 'should not normally use this flag.'))));
} catch (PhutilArgumentUsageException $ex) {
    $args->printUsageException($ex);
    exit(77);
}
// First, test that the Phabricator configuration is set up correctly. After
// we know this works we'll test any administrative credentials specifically.
$test_api = new PhabricatorStorageManagementAPI();
$test_api->setUser($default_user);
$test_api->setHost($default_host);
$test_api->setPort($default_port);
$test_api->setPassword($conf->getPassword());
$test_api->setNamespace($args->getArg('namespace'));
try {
开发者ID:JohnnyEstilles,项目名称:phabricator,代码行数:31,代码来源:manage_storage.php


注:本文中的PhabricatorLiskDAO::getDefaultStorageNamespace方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。