MediaWiki  1.23.13
IORMRow Interface Reference
Inheritance diagram for IORMRow:

Public Member Functions

 addToField ( $field, $amount)
 Add an amount (can be negative) to the specified field (needs to be numeric). More...
 
 getField ( $name, $default=null)
 Gets the value of a field. More...
 
 getFieldNames ()
 Return the names of the fields. More...
 
 getFields ()
 Return the names and values of the fields. More...
 
 getId ()
 Returns the objects database id. More...
 
 getSetFieldNames ()
 Return the names of the fields. More...
 
 getTable ()
 Returns the table this IORMRow is a row in. More...
 
 hasField ( $name)
 Gets if a certain field is set. More...
 
 hasIdField ()
 Gets if the id field is set. More...
 
 loadAndGetField ( $name)
 Gets the value of a field but first loads it if not done so already. More...
 
 loadDefaults ( $override=true)
 Load the default values, via getDefaults. More...
 
 loadFields ( $fields=null, $override=true, $skipLoaded=false)
 Load the specified fields from the database. More...
 
 loadSummaryFields ( $summaryFields=null)
 Computes and updates the values of the summary fields. More...
 
 remove ()
 Removes the object from the database. More...
 
 removeField ( $name)
 Remove a field. More...
 
 save ( $functionName=null)
 Writes the answer to the database, either updating it when it already exists, or inserting it when it doesn't. More...
 
 setField ( $name, $value)
 Sets the value of a field. More...
 
 setFields (array $fields, $override=true)
 Sets multiple fields. More...
 
 setId ( $id)
 Sets the objects database id. More...
 
 setSummaryMode ( $summaryMode)
 Sets the value for the. More...
 
 setUpdateSummaries ( $update)
 Sets the value for the. More...
 
 toArray ( $fields=null, $incNullId=false)
 Serializes the object to an associative array which can then easily be converted into JSON or similar. More...
 

Detailed Description

Definition at line 34 of file IORMRow.php.

Member Function Documentation

◆ addToField()

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.

◆ getField()

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().

◆ getFieldNames()

IORMRow::getFieldNames ( )

Return the names of the fields.

Since
1.20
Returns
array

Implemented in ORMRow.

◆ getFields()

IORMRow::getFields ( )

Return the names and values of the fields.

Since
1.20
Returns
array

Implemented in ORMRow.

Referenced by ORMTable\getWriteValues(), and ORMRowTest\testSetFields().

◆ getId()

IORMRow::getId ( )

Returns the objects database id.

Since
1.20
Returns
integer|null

Implemented in ORMRow.

Referenced by ORMTable\removeRow(), and ORMTable\updateRow().

◆ getSetFieldNames()

IORMRow::getSetFieldNames ( )

Return the names of the fields.

Since
1.20
Returns
array

Implemented in ORMRow.

◆ getTable()

IORMRow::getTable ( )

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().

◆ hasField()

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().

◆ hasIdField()

IORMRow::hasIdField ( )

Gets if the id field is set.

Since
1.20
Returns
boolean

Implemented in ORMRow.

◆ loadAndGetField()

IORMRow::loadAndGetField (   $name)

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.

◆ loadDefaults()

IORMRow::loadDefaults (   $override = true)

Load the default values, via getDefaults.

Since
1.20
Deprecated:
since 1.22
Parameters
boolean$override

Implemented in ORMRow.

◆ loadFields()

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.

◆ loadSummaryFields()

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.

◆ remove()

IORMRow::remove ( )

Removes the object from the database.

Since
1.20
Deprecated:
since 1.22
Returns
boolean Success indicator

Implemented in ORMRow.

◆ removeField()

IORMRow::removeField (   $name)

Remove a field.

Since
1.20
Parameters
string$name

Implemented in ORMRow.

◆ save()

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.

◆ setField()

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 ORMTable\insertRow(), and ORMRowTest\testSetField().

◆ setFields()

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().

◆ setId()

IORMRow::setId (   $id)

Sets the objects database id.

Since
1.20
Parameters
integer | null$id

Implemented in ORMRow.

◆ setSummaryMode()

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.

◆ setUpdateSummaries()

IORMRow::setUpdateSummaries (   $update)

Sets the value for the.

See also
$updateSummaries field.
Since
1.20
Deprecated:
since 1.22
Parameters
boolean$update

Implemented in ORMRow.

◆ toArray()

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.


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