Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F119460935
DefaultDatabaseConfigurationProvider.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Jun 26, 23:19
Size
988 B
Mime Type
text/x-php
Expires
Sat, Jun 28, 23:19 (2 d)
Engine
blob
Format
Raw Data
Handle
27024927
Attached To
rPH Phabricator
DefaultDatabaseConfigurationProvider.php
View Options
<?php
final
class
DefaultDatabaseConfigurationProvider
extends
Phobject
implements
DatabaseConfigurationProvider
{
private
$dao
;
private
$mode
;
private
$namespace
;
public
function
__construct
(
LiskDAO
$dao
=
null
,
$mode
=
'r'
,
$namespace
=
'phabricator'
)
{
$this
->
dao
=
$dao
;
$this
->
mode
=
$mode
;
$this
->
namespace
=
$namespace
;
}
public
function
getUser
()
{
return
PhabricatorEnv
::
getEnvConfig
(
'mysql.user'
);
}
public
function
getPassword
()
{
return
new
PhutilOpaqueEnvelope
(
PhabricatorEnv
::
getEnvConfig
(
'mysql.pass'
));
}
public
function
getHost
()
{
return
PhabricatorEnv
::
getEnvConfig
(
'mysql.host'
);
}
public
function
getPort
()
{
return
PhabricatorEnv
::
getEnvConfig
(
'mysql.port'
);
}
public
function
getDatabase
()
{
if
(!
$this
->
getDao
())
{
return
null
;
}
return
$this
->
namespace
.
'_'
.
$this
->
getDao
()->
getApplicationName
();
}
protected
function
getDao
()
{
return
$this
->
dao
;
}
}
Event Timeline
Log In to Comment