MediaWiki
REL1_22
|
Public Member Functions | |
addToField ($field, $amount) | |
Add an amount (can be negative) to the specified field (needs to be numeric). | |
getField ($name, $default=null) | |
Gets the value of a field. | |
getFieldNames () | |
Return the names of the fields. | |
getFields () | |
Return the names and values of the fields. | |
getId () | |
Returns the objects database id. | |
getSetFieldNames () | |
Return the names of the fields. | |
getTable () | |
Returns the table this IORMRow is a row in. | |
hasField ($name) | |
Gets if a certain field is set. | |
hasIdField () | |
Gets if the id field is set. | |
loadAndGetField ($name) | |
Gets the value of a field but first loads it if not done so already. | |
loadDefaults ($override=true) | |
Load the default values, via getDefaults. | |
loadFields ($fields=null, $override=true, $skipLoaded=false) | |
Load the specified fields from the database. | |
loadSummaryFields ($summaryFields=null) | |
Computes and updates the values of the summary fields. | |
remove () | |
Removes the object from the database. | |
removeField ($name) | |
Remove a field. | |
save ($functionName=null) | |
Writes the answer to the database, either updating it when it already exists, or inserting it when it doesn't. | |
setField ($name, $value) | |
Sets the value of a field. | |
setFields (array $fields, $override=true) | |
Sets multiple fields. | |
setId ($id) | |
Sets the objects database id. | |
setSummaryMode ($summaryMode) | |
Sets the value for the. | |
setUpdateSummaries ($update) | |
Sets the value for the. | |
toArray ($fields=null, $incNullId=false) | |
Serializes the object to an associative array which can then easily be converted into JSON or similar. |
Definition at line 34 of file IORMRow.php.
IORMRow::addToField | ( | $ | field, |
$ | amount | ||
) |
Add an amount (can be negative) to the specified field (needs to be numeric).
string | $field | |
integer | $amount |
Implemented in ORMRow.
IORMRow::getField | ( | $ | name, |
$ | default = null |
||
) |
Gets the value of a field.
string | $name | |
mixed | $default |
MWException |
Implemented in ORMRow.
Referenced by ORMRowTest\assertFieldValues(), ORMRowTest\testSetField(), ORMRowTest\testSetFields(), and ORMRowTest\verifyFields().
Return the names and values of the fields.
Implemented in ORMRow.
Referenced by ORMRowTest\testSetFields().
IORMRow::getId | ( | ) |
Returns the table this IORMRow is a row in.
Implemented in ORMRow.
Referenced by ORMRowTest\testSetFields().
IORMRow::hasField | ( | $ | name | ) |
Gets if a certain field is set.
string | $name |
Implemented in ORMRow.
Referenced by ORMRowTest\testSetFields().
IORMRow::loadAndGetField | ( | $ | name | ) |
Gets the value of a field but first loads it if not done so already.
string | $name |
Implemented in ORMRow.
IORMRow::loadDefaults | ( | $ | override = true | ) |
Load the default values, via getDefaults.
boolean | $override |
Implemented in ORMRow.
IORMRow::loadFields | ( | $ | fields = null , |
$ | override = true , |
||
$ | skipLoaded = false |
||
) |
Load the specified fields from the database.
array | null | $fields | |
boolean | $override | |
boolean | $skipLoaded |
Implemented in ORMRow.
IORMRow::loadSummaryFields | ( | $ | summaryFields = null | ) |
Computes and updates the values of the summary fields.
array | string | null | $summaryFields |
Implemented in ORMRow.
IORMRow::remove | ( | ) |
Removes the object from the database.
Implemented in ORMRow.
IORMRow::removeField | ( | $ | name | ) |
IORMRow::save | ( | $ | functionName = null | ) |
Writes the answer to the database, either updating it when it already exists, or inserting it when it doesn't.
string | null | $functionName |
Implemented in ORMRow.
IORMRow::setField | ( | $ | name, |
$ | value | ||
) |
Sets the value of a field.
Strings can be provided for other types, so this method can be called from unserialization handlers.
string | $name | |
mixed | $value |
MWException |
Implemented in ORMRow.
Referenced by ORMRowTest\testSetField().
IORMRow::setFields | ( | array $ | fields, |
$ | override = true |
||
) |
Sets multiple fields.
array | $fields | The fields to set |
boolean | $override | Override already set fields with the provided values? |
Implemented in ORMRow.
Referenced by ORMRowTest\testSetFields().
IORMRow::setId | ( | $ | id | ) |
IORMRow::setSummaryMode | ( | $ | summaryMode | ) |
Sets the value for the.
boolean | $summaryMode |
Implemented in ORMRow.
IORMRow::setUpdateSummaries | ( | $ | update | ) |
Sets the value for the.
boolean | $update |
Implemented in ORMRow.
IORMRow::toArray | ( | $ | fields = null , |
$ | incNullId = false |
||
) |
Serializes the object to an associative array which can then easily be converted into JSON or similar.
null | array | $fields | |
boolean | $incNullId |
Implemented in ORMRow.
Referenced by ApiQueryORM\formatRow().