[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PhabricatorMySQLConfigOptions 4 extends PhabricatorApplicationConfigOptions { 5 6 public function getName() { 7 return pht('MySQL'); 8 } 9 10 public function getDescription() { 11 return pht('Database configuration.'); 12 } 13 14 public function getOptions() { 15 return array( 16 $this->newOption('mysql.host', 'string', 'localhost') 17 ->setLocked(true) 18 ->setDescription( 19 pht('MySQL database hostname.')) 20 ->addExample('localhost', pht('MySQL on this machine')) 21 ->addExample('db.example.com:3300', pht('Nonstandard port')), 22 $this->newOption('mysql.user', 'string', 'root') 23 ->setLocked(true) 24 ->setDescription( 25 pht('MySQL username to use when connecting to the database.')), 26 $this->newOption('mysql.pass', 'string', null) 27 ->setHidden(true) 28 ->setDescription( 29 pht('MySQL password to use when connecting to the database.')), 30 $this->newOption( 31 'mysql.configuration-provider', 32 'class', 33 'DefaultDatabaseConfigurationProvider') 34 ->setLocked(true) 35 ->setBaseClass('DatabaseConfigurationProvider') 36 ->setSummary( 37 pht('Configure database configuration class.')) 38 ->setDescription( 39 pht( 40 'Phabricator chooses which database to connect to through a '. 41 'swappable configuration provider. You almost certainly do not '. 42 'need to change this.')), 43 $this->newOption( 44 'mysql.implementation', 45 'class', 46 (extension_loaded('mysqli') 47 ? 'AphrontMySQLiDatabaseConnection' 48 : 'AphrontMySQLDatabaseConnection')) 49 ->setLocked(true) 50 ->setBaseClass('AphrontMySQLDatabaseConnectionBase') 51 ->setSummary( 52 pht('Configure database connection class.')) 53 ->setDescription( 54 pht( 55 'Phabricator connects to MySQL through a swappable abstraction '. 56 'layer. You can choose an alternate implementation by setting '. 57 'this option. To provide your own implementation, extend '. 58 '`AphrontMySQLDatabaseConnectionBase`. It is very unlikely that '. 59 'you need to change this.')), 60 $this->newOption('storage.default-namespace', 'string', 'phabricator') 61 ->setLocked(true) 62 ->setSummary( 63 pht('The namespace that Phabricator databases should use.')) 64 ->setDescription( 65 pht( 66 "Phabricator puts databases in a namespace, which defaults to ". 67 "'phabricator' -- for instance, the Differential database is ". 68 "named 'phabricator_differential' by default. You can change ". 69 "this namespace if you want. Normally, you should not do this ". 70 "unless you are developing Phabricator and using namespaces to ". 71 "separate multiple sandbox datasets.")), 72 $this->newOption('mysql.port', 'string', null) 73 ->setLocked(true) 74 ->setDescription( 75 pht('MySQL port to use when connecting to the database.')), 76 ); 77 } 78 79 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |