Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F430415
DefaultDatabaseConfigurationProvider.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
975 B
Referenced Files
None
Subscribers
None
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
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, May 3, 10:28 AM (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
60212
Default Alt Text
DefaultDatabaseConfigurationProvider.php (975 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment