Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F62560763
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
Tue, May 14, 00:36
Size
975 B
Mime Type
text/x-php
Expires
Thu, May 16, 00:36 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
17662969
Attached To
rPH Phabricator
DefaultDatabaseConfigurationProvider.php
View Options
<?php
final
class
DefaultDatabaseConfigurationProvider
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
();
}
final
protected
function
getDao
()
{
return
$this
->
dao
;
}
}
Event Timeline
Log In to Comment