[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
(no description)
File Size: | 518 lines (13 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
IORMTable:: (38 methods):
getName()
getRowClass()
getFields()
getDefaults()
getSummaryFields()
select()
selectObjects()
rawSelect()
selectFields()
selectRow()
rawSelectRow()
selectFieldsRow()
has()
exists()
count()
delete()
getAPIParams()
getFieldDescriptions()
getReadDb()
setReadDb()
getTargetWiki()
setTargetWiki()
getReadDbConnection()
getWriteDbConnection()
getLoadBalancer()
releaseConnection()
update()
updateSummaryFields()
getPrefixedValues()
getPrefixedFields()
getPrefixedField()
unprefixFieldNames()
unprefixFieldName()
getFieldsFromDBResult()
newRowFromDBResult()
newRow()
getFieldNames()
canHaveField()
getName() X-Ref |
Returns the name of the database table objects of this type are stored in. return: string |
getRowClass() X-Ref |
Returns the name of a IORMRow implementing class that represents single rows in this table. return: string |
getFields() X-Ref |
Returns an array with the fields and their types this object contains. This corresponds directly to the fields in the database, without prefix. field name => type Allowed types: * id * str * int * float * bool * array * blob return: array |
getDefaults() X-Ref |
Returns a list of default field values. field name => field value return: array |
getSummaryFields() X-Ref |
Returns a list of the summary fields. These are fields that cache computed values, such as the amount of linked objects of $type. This is relevant as one might not want to do actions such as log changes when these get updated. return: array |
select( $fields = null, array $conditions = array() X-Ref |
Selects the the specified fields of the records matching the provided conditions and returns them as DBDataObject. Field names get prefixed. param: array|string|null $fields param: array $conditions param: array $options param: string|null $functionName return: ORMResult The result set |
selectObjects( $fields = null, array $conditions = array() X-Ref |
Selects the the specified fields of the records matching the provided conditions and returns them as DBDataObject. Field names get prefixed. param: array|string|null $fields param: array $conditions param: array $options param: string|null $functionName return: array Array of self |
rawSelect( $fields = null, array $conditions = array() X-Ref |
Do the actual select. param: null|string|array $fields param: array $conditions param: array $options param: null|string $functionName return: ResultWrapper |
selectFields( $fields = null, array $conditions = array() X-Ref |
Selects the the specified fields of the records matching the provided conditions and returns them as associative arrays. Provided field names get prefixed. Returned field names will not have a prefix. When $collapse is true: If one field is selected, each item in the result array will be this field. If two fields are selected, each item in the result array will have as key the first field and as value the second field. If more then two fields are selected, each item will be an associative array. param: array|string|null $fields param: array $conditions param: array $options param: bool $collapse Set to false to always return each result row as associative array. param: string|null $functionName return: array Array of array |
selectRow( $fields = null, array $conditions = array() X-Ref |
Selects the the specified fields of the first matching record. Field names get prefixed. param: array|string|null $fields param: array $conditions param: array $options param: string|null $functionName return: IORMRow|bool False on failure |
rawSelectRow( array $fields, array $conditions = array() X-Ref |
Selects the the specified fields of the records matching the provided conditions. Field names do NOT get prefixed. param: array $fields param: array $conditions param: array $options param: string|null $functionName return: ResultWrapper |
selectFieldsRow( $fields = null, array $conditions = array() X-Ref |
Selects the the specified fields of the first record matching the provided conditions and returns it as an associative array, or false when nothing matches. This method makes use of selectFields and expects the same parameters and returns the same results (if there are any, if there are none, this method returns false). param: array|string|null $fields param: array $conditions param: array $options param: bool $collapse Set to false to always return each result row as associative array. param: string|null $functionName return: mixed|array|bool False on failure |
has( array $conditions = array() X-Ref |
Returns if there is at least one record matching the provided conditions. Condition field names get prefixed. param: array $conditions return: bool |
exists() X-Ref |
Checks if the table exists return: bool |
count( array $conditions = array() X-Ref |
Returns the amount of matching records. Condition field names get prefixed. Note that this can be expensive on large tables. In such cases you might want to use DatabaseBase::estimateRowCount instead. param: array $conditions param: array $options return: int |
delete( array $conditions, $functionName = null ) X-Ref |
Removes the object from the database. param: array $conditions param: string|null $functionName return: bool Success indicator |
getAPIParams( $requireParams = false, $setDefaults = false ) X-Ref |
Get API parameters for the fields supported by this object. param: bool $requireParams param: bool $setDefaults return: array |
getFieldDescriptions() X-Ref |
Returns an array with the fields and their descriptions. field name => field description return: array |
getReadDb() X-Ref |
Get the database type used for read operations. return: int DB_ enum |
setReadDb( $db ) X-Ref |
Set the database type to use for read operations. param: int $db |
getTargetWiki() X-Ref |
Get the ID of the any foreign wiki to use as a target for database operations return: string|bool The target wiki, in a form that LBFactory |
setTargetWiki( $wiki ) X-Ref |
Set the ID of the any foreign wiki to use as a target for database operations param: string|bool $wiki The target wiki, in a form that LBFactory |
getReadDbConnection() X-Ref |
Get the database type used for read operations. This is to be used instead of wfGetDB. return: DatabaseBase The database object |
getWriteDbConnection() X-Ref |
Get the database type used for read operations. This is to be used instead of wfGetDB. return: DatabaseBase The database object |
getLoadBalancer() X-Ref |
Get the database type used for read operations. return: LoadBalancer The database load balancer object |
releaseConnection( DatabaseBase $db ) X-Ref |
Releases the lease on the given database connection. This is useful mainly for connections to a foreign wiki. It does nothing for connections to the local wiki. param: DatabaseBase $db The database |
update( array $values, array $conditions = array() X-Ref |
Update the records matching the provided conditions by setting the fields that are keys in the $values param to their corresponding values. param: array $values param: array $conditions return: bool Success indicator |
updateSummaryFields( $summaryFields = null, array $conditions = array() X-Ref |
Computes the values of the summary fields of the objects matching the provided conditions. param: array|string|null $summaryFields param: array $conditions |
getPrefixedValues( array $values ) X-Ref |
Takes in an associative array with field names as keys and their values as value. The field names are prefixed with the db field prefix. param: array $values return: array |
getPrefixedFields( array $fields ) X-Ref |
Takes in a field or array of fields and returns an array with their prefixed versions, ready for db usage. param: array $fields return: array |
getPrefixedField( $field ) X-Ref |
Takes in a field and returns an it's prefixed version, ready for db usage. param: string|array $field return: string |
unprefixFieldNames( array $fieldNames ) X-Ref |
Takes an array of field names with prefix and returns the unprefixed equivalent. param: array $fieldNames return: array |
unprefixFieldName( $fieldName ) X-Ref |
Takes a field name with prefix and returns the unprefixed equivalent. param: string $fieldName return: string |
getFieldsFromDBResult( stdClass $result ) X-Ref |
Get an array with fields from a database result, that can be fed directly to the constructor or to setFields. param: stdClass $result return: array |
newRowFromDBResult( stdClass $result ) X-Ref |
Get a new instance of the class from a database result. param: stdClass $result return: IORMRow |
newRow( array $data, $loadDefaults = false ) X-Ref |
Get a new instance of the class from an array. param: array $data param: bool $loadDefaults return: IORMRow |
getFieldNames() X-Ref |
Return the names of the fields. return: array |
canHaveField( $name ) X-Ref |
Gets if the object can take a certain field. param: string $name return: bool |
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |