MediaWiki  REL1_22
IORMRow Interface Reference
Inheritance diagram for IORMRow:

List of all members.

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.

Detailed Description

Definition at line 34 of file IORMRow.php.


Member Function Documentation

IORMRow::addToField ( field,
amount 
)

Add an amount (can be negative) to the specified field (needs to be numeric).

Since:
1.20
Deprecated:
since 1.22
Parameters:
string$field
integer$amount
Returns:
boolean Success indicator

Implemented in ORMRow.

IORMRow::getField ( name,
default = null 
)

Gets the value of a field.

Since:
1.20
Parameters:
string$name
mixed$default
Exceptions:
MWException
Returns:
mixed

Implemented in ORMRow.

Referenced by ORMRowTest\assertFieldValues(), ORMRowTest\testSetField(), ORMRowTest\testSetFields(), and ORMRowTest\verifyFields().

Return the names of the fields.

Since:
1.20
Returns:
array

Implemented in ORMRow.

Return the names and values of the fields.

Since:
1.20
Returns:
array

Implemented in ORMRow.

Referenced by ORMRowTest\testSetFields().

Returns the objects database id.

Since:
1.20
Returns:
integer|null

Implemented in ORMRow.

Return the names of the fields.

Since:
1.20
Returns:
array

Implemented in ORMRow.

Returns the table this IORMRow is a row in.

Since:
1.20
Deprecated:
since 1.22
Returns:
IORMTable

Implemented in ORMRow.

Referenced by ORMRowTest\testSetFields().

IORMRow::hasField ( name)

Gets if a certain field is set.

Since:
1.20
Parameters:
string$name
Returns:
boolean

Implemented in ORMRow.

Referenced by ORMRowTest\testSetFields().

Gets if the id field is set.

Since:
1.20
Returns:
boolean

Implemented in ORMRow.

Gets the value of a field but first loads it if not done so already.

Since:
1.20
Deprecated:
since 1.22
Parameters:
string$name
Returns:
mixed

Implemented in ORMRow.

IORMRow::loadDefaults ( override = true)

Load the default values, via getDefaults.

Since:
1.20
Deprecated:
since 1.22
Parameters:
boolean$override

Implemented in ORMRow.

IORMRow::loadFields ( fields = null,
override = true,
skipLoaded = false 
)

Load the specified fields from the database.

Since:
1.20
Deprecated:
since 1.22
Parameters:
array | null$fields
boolean$override
boolean$skipLoaded
Returns:
bool Success indicator

Implemented in ORMRow.

IORMRow::loadSummaryFields ( summaryFields = null)

Computes and updates the values of the summary fields.

Since:
1.20
Deprecated:
since 1.22
Parameters:
array | string | null$summaryFields

Implemented in ORMRow.

Removes the object from the database.

Since:
1.20
Deprecated:
since 1.22
Returns:
boolean Success indicator

Implemented in ORMRow.

IORMRow::removeField ( name)

Remove a field.

Since:
1.20
Parameters:
string$name

Implemented in ORMRow.

IORMRow::save ( functionName = null)

Writes the answer to the database, either updating it when it already exists, or inserting it when it doesn't.

Since:
1.20
Parameters:
string | null$functionName
Deprecated:
since 1.22
Returns:
boolean Success indicator

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.

Since:
1.20
Parameters:
string$name
mixed$value
Exceptions:
MWException

Implemented in ORMRow.

Referenced by ORMRowTest\testSetField().

IORMRow::setFields ( array fields,
override = true 
)

Sets multiple fields.

Since:
1.20
Parameters:
array$fieldsThe fields to set
boolean$overrideOverride already set fields with the provided values?

Implemented in ORMRow.

Referenced by ORMRowTest\testSetFields().

IORMRow::setId ( id)

Sets the objects database id.

Since:
1.20
Parameters:
integer | null$id

Implemented in ORMRow.

IORMRow::setSummaryMode ( summaryMode)

Sets the value for the.

See also:
$inSummaryMode field.
Since:
1.20
Deprecated:
since 1.22
Parameters:
boolean$summaryMode

Implemented in ORMRow.

Sets the value for the.

See also:
$updateSummaries field.
Since:
1.20
Deprecated:
since 1.22
Parameters:
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.

Since:
1.20
Parameters:
null | array$fields
boolean$incNullId
Returns:
array

Implemented in ORMRow.

Referenced by ApiQueryORM\formatRow().


The documentation for this interface was generated from the following file: