Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F443643
PhabricatorConfigDatabaseSchema.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
PhabricatorConfigDatabaseSchema.php
View Options
<?php
final
class
PhabricatorConfigDatabaseSchema
extends
PhabricatorConfigStorageSchema
{
private
$characterSet
;
private
$collation
;
private
$tables
=
array
();
public
function
addTable
(
PhabricatorConfigTableSchema
$table
)
{
$key
=
$table
->
getName
();
if
(
isset
(
$this
->
tables
[
$key
]))
{
throw
new
Exception
(
pht
(
'Trying to add duplicate table "%s"!'
,
$key
));
}
$this
->
tables
[
$key
]
=
$table
;
return
$this
;
}
public
function
getTables
()
{
return
$this
->
tables
;
}
public
function
getTable
(
$key
)
{
return
idx
(
$this
->
tables
,
$key
);
}
protected
function
getSubschemata
()
{
return
$this
->
getTables
();
}
public
function
compareToSimilarSchema
(
PhabricatorConfigStorageSchema
$expect
)
{
$issues
=
array
();
if
(
$this
->
getCharacterSet
()
!=
$expect
->
getCharacterSet
())
{
$issues
[]
=
self
::
ISSUE_CHARSET
;
}
if
(
$this
->
getCollation
()
!=
$expect
->
getCollation
())
{
$issues
[]
=
self
::
ISSUE_COLLATION
;
}
return
$issues
;
}
public
function
newEmptyClone
()
{
$clone
=
clone
$this
;
$clone
->
tables
=
array
();
return
$clone
;
}
public
function
setCollation
(
$collation
)
{
$this
->
collation
=
$collation
;
return
$this
;
}
public
function
getCollation
()
{
return
$this
->
collation
;
}
public
function
setCharacterSet
(
$character_set
)
{
$this
->
characterSet
=
$character_set
;
return
$this
;
}
public
function
getCharacterSet
()
{
return
$this
->
characterSet
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, May 4, 10:56 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
64826
Default Alt Text
PhabricatorConfigDatabaseSchema.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment