PHP Класс LeanMapper\Row

Автор: Vojtěch Kohout
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( Result $result, integer $id )
__get ( string $name ) : mixed Gets value of given column
__isset ( string $name ) : boolean Tells whether Row has given column and is not null
__set ( string $name, mixed $value ) Sets value of given column
__unset ( string $name ) Unsets given column
addToReferencing ( array $values, string $table, string | null $viaColumn = null, Filtering $filtering = null, string | null $strategy = null ) Adds new data entry to referencing Result
attach ( integer $id, string $table ) Marks Row as attached
cleanReferencedRowsCache ( string | null $table = null, string | null $viaColumn = null ) Cleans in-memory cache with referenced rows
cleanReferencingAddedAndRemovedMeta ( string $table, string | null $viaColumn = null, Filtering $filtering = null, string | null $strategy = null )
cleanReferencingRowsCache ( string | null $table = null, string | null $viaColumn = null ) Cleans in-memory cache with referencing rows
createReferencingDataDifference ( string $table, string | null $viaColumn = null, Filtering $filtering = null, string | null $strategy = null ) : DataDifference
detach ( ) Detaches Row (it means mark it as non-persisted)
getData ( ) : array Returns values of columns
getMapper ( ) : leanmapper\IMapper | null
getModifiedData ( ) : array Returns values of columns that were modified
getResultProxy ( string $proxyClass = 'LeanMapper\ResultProxy' ) : ResultProxy
hasColumn ( string $name ) : boolean Tells whether Row has given column
hasConnection ( ) : boolean
isDetached ( ) : boolean Tells whether Row is in detached state
isModified ( ) : boolean Tells whether Row is in modified state
markAsUpdated ( ) Marks Row as non-modified (isModified returns false right after this method call)
referenced ( string $table, string | null $viaColumn = null, Filtering $filtering = null ) : Row | null Gets referenced Row instance
referencing ( string $table, string | null $viaColumn = null, Filtering $filtering = null, string | null $strategy = null ) : Row[] Gets array of Row instances referencing current Row
removeFromReferencing ( array $values, string $table, string | null $viaColumn = null, Filtering $filtering = null, string | null $strategy = null ) Remove given data entry from referencing Result
setConnection ( Connection $connection )
setMapper ( leanmapper\IMapper $mapper )
setReferencedRow ( self $row = null, string $viaColumn )

Описание методов

__construct() публичный Метод

public __construct ( Result $result, integer $id )
$result Result
$id integer

__get() публичный Метод

Gets value of given column
public __get ( string $name ) : mixed
$name string
Результат mixed

__isset() публичный Метод

Tells whether Row has given column and is not null
public __isset ( string $name ) : boolean
$name string
Результат boolean

__set() публичный Метод

Sets value of given column
public __set ( string $name, mixed $value )
$name string
$value mixed

__unset() публичный Метод

Unsets given column
public __unset ( string $name )
$name string

addToReferencing() публичный Метод

Adds new data entry to referencing Result
public addToReferencing ( array $values, string $table, string | null $viaColumn = null, Filtering $filtering = null, string | null $strategy = null )
$values array
$table string
$viaColumn string | null
$filtering Filtering
$strategy string | null

attach() публичный Метод

Marks Row as attached
public attach ( integer $id, string $table )
$id integer
$table string

cleanReferencedRowsCache() публичный Метод

Cleans in-memory cache with referenced rows
public cleanReferencedRowsCache ( string | null $table = null, string | null $viaColumn = null )
$table string | null
$viaColumn string | null

cleanReferencingAddedAndRemovedMeta() публичный Метод

public cleanReferencingAddedAndRemovedMeta ( string $table, string | null $viaColumn = null, Filtering $filtering = null, string | null $strategy = null )
$table string
$viaColumn string | null
$filtering Filtering
$strategy string | null

cleanReferencingRowsCache() публичный Метод

Cleans in-memory cache with referencing rows
public cleanReferencingRowsCache ( string | null $table = null, string | null $viaColumn = null )
$table string | null
$viaColumn string | null

createReferencingDataDifference() публичный Метод

public createReferencingDataDifference ( string $table, string | null $viaColumn = null, Filtering $filtering = null, string | null $strategy = null ) : DataDifference
$table string
$viaColumn string | null
$filtering Filtering
$strategy string | null
Результат DataDifference

detach() публичный Метод

Detaches Row (it means mark it as non-persisted)
public detach ( )

getData() публичный Метод

Returns values of columns
public getData ( ) : array
Результат array

getMapper() публичный Метод

public getMapper ( ) : leanmapper\IMapper | null
Результат leanmapper\IMapper | null

getModifiedData() публичный Метод

Returns values of columns that were modified
public getModifiedData ( ) : array
Результат array

getResultProxy() публичный Метод

public getResultProxy ( string $proxyClass = 'LeanMapper\ResultProxy' ) : ResultProxy
$proxyClass string
Результат ResultProxy

hasColumn() публичный Метод

Tells whether Row has given column
public hasColumn ( string $name ) : boolean
$name string
Результат boolean

hasConnection() публичный Метод

public hasConnection ( ) : boolean
Результат boolean

isDetached() публичный Метод

Tells whether Row is in detached state
public isDetached ( ) : boolean
Результат boolean

isModified() публичный Метод

Tells whether Row is in modified state
public isModified ( ) : boolean
Результат boolean

markAsUpdated() публичный Метод

Marks Row as non-modified (isModified returns false right after this method call)
public markAsUpdated ( )

referenced() публичный Метод

Gets referenced Row instance
public referenced ( string $table, string | null $viaColumn = null, Filtering $filtering = null ) : Row | null
$table string
$viaColumn string | null
$filtering Filtering
Результат Row | null

referencing() публичный Метод

Gets array of Row instances referencing current Row
public referencing ( string $table, string | null $viaColumn = null, Filtering $filtering = null, string | null $strategy = null ) : Row[]
$table string
$viaColumn string | null
$filtering Filtering
$strategy string | null
Результат Row[]

removeFromReferencing() публичный Метод

Remove given data entry from referencing Result
public removeFromReferencing ( array $values, string $table, string | null $viaColumn = null, Filtering $filtering = null, string | null $strategy = null )
$values array
$table string
$viaColumn string | null
$filtering Filtering
$strategy string | null

setConnection() публичный Метод

public setConnection ( Connection $connection )
$connection Connection

setMapper() публичный Метод

public setMapper ( leanmapper\IMapper $mapper )
$mapper leanmapper\IMapper

setReferencedRow() публичный Метод

public setReferencedRow ( self $row = null, string $viaColumn )
$row self
$viaColumn string