User Tools

Site Tools


Sidebar

Dokumentation

vortex:apidoc:tablerecordfactory

TableRecordFactory

TableRecordFactory

Filename : /classes/table/tablerecordfactory.php
Extends : CacheObject

Description

Factory to handle caching of TableRecords, all methods called statically

Fields

Methods

clear( $save )

Definition : public static function clear( $save = true )

Returns :

Description
Clear the factory

Parameters

$save

Type : boolean
Default value : true

Description
Whether to save the modified records in the factory prior to clearing

destory( $save )

Definition : public static function destroy( $save = true )

Returns :

Description
Destroy this factory

Parameters

$save

Type : boolean
Default value : true

Description
Whether to save the modified records in the factory prior to destroying

getInstance()

Definition : public static function &getInstance()

Returns : TableRecordFactory

Description
Returns the current instance of the factory, creating it if needed. Not for use while scripting.

Parameters

getTableRecord( $idtable, $idpost )

Definition : public static function getTableRecord( $idtable, $idpost = null)

Returns : TableRecord

Description
Returns the TableRecord matching the given criteria

Parameters

$idpost

Type : int
Default value : null

Description
If null and $idtable is UUID, the record matching the given UUID is returned. Otherwise the record with an ID matching $idspost in the table matching $idtable is returned

$idtable

Type : String
Default value :

Description
Numerical ID of Table to search, or UUID of TableRecord to get

getTableREcordFromRecord( $record )

Definition : public static function getTableRecordFromRecord( &$record )

Returns : TableRecord

Description
Returns the cached TableRecord matching the given TableRecord

Parameters

$record

Type : TableRecord
Default value :

Description
The TableRecord from which to get the cached version

getTableRecordFromView( $viewData )

Definition : public static function getTableRecordFromView( &$viewData )

Returns : TableRecord

Description
Parse the data from the view into the TableRecords they represent and return the top TableRecord

Parameters

$viewData

Type : Object
Default value :

Description
Data returned from view

import( $tr )

Definition : public static function import( &$tr )

Returns :

Description
Import the supplied TableRecord into the cache

Parameters

&$tr

Type : TableRecord
Default value :

Description
The TableRecord to add to the cache

remove( $tableRecord )

Definition : public static remove( $tableRecord )

Returns :

Description
Removes the given TableRecord from the cache

Parameters

$tableRecord

Type : TableRecord
Default value :

Description
TableRecord or UUID to remove from cache

saveAll( $force )

Definition : public static saveAll( $force = false )

Returns :

Description
Saves all the records in the cache

Parameters

$force

Type : boolean
Default value : false

Description
Whether to force a save to all TableRecords or just to save the modified ones

vortex/apidoc/tablerecordfactory.txt · Last modified: 2019/06/28 07:10 by hubbe