PHP 클래스 LeanMapper\Result

저자: Vojtěch Kohout
상속: implements Iterator
파일 보기 프로젝트 열기: tharos/leanmapper 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$mapper leanmapper\IMapper

공개 메소드들

메소드 설명
__sleep ( ) : array
__wakeup ( )
addDataEntry ( array $values ) Adds new data entry
addToReferencing ( array $values, string $table, string | null $viaColumn = null, Filtering $filtering = null, string | null $strategy = self::STRATEGY_IN ) Adds new data entry to referencing Result
attach ( mixed $id, string $table )
cleanAddedAndRemovedMeta ( )
cleanReferencedResultsCache ( string | null $table = null, string | null $viaColumn = null ) Cleans in-memory cache with referenced results
cleanReferencingAddedAndRemovedMeta ( string $table, string | null $viaColumn = null, Filtering $filtering = null, string | null $strategy = self::STRATEGY_IN )
cleanReferencingResultsCache ( string | null $table = null, string | null $viaColumn = null ) Cleans in-memory cache with referencing results
createDataDifference ( ) : DataDifference Creates new DataDifference instance relevant to current Result state
createDetachedInstance ( ) : self Creates new detached instance (it means non-persisted)
createInstance ( Row | Row[] $data, string $table, Connection $connection, leanmapper\IMapper $mapper ) : self Creates new common instance (it means persisted)
createReferencingDataDifference ( string $table, string | null $viaColumn = null, Filtering $filtering = null, string | null $strategy = self::STRATEGY_IN ) : DataDifference
current ( ) : mixed
enableSerialization ( Connection $connection )
getData ( integer $id ) : array Returns values of columns of requested row
getDataEntry ( mixed $id, string $key ) : mixed Gets value of given column from row with given id
getMapper ( ) : leanmapper\IMapper | null
getModifiedData ( integer $id ) : array Returns values of columns of requested row that were modified
getProxy ( string $proxyClass ) : ResultProxy
getReferencedRow ( integer $id, string $table, string | null $viaColumn = null, Filtering $filtering = null ) : Row | null Creates new Row instance pointing to requested row in referenced Result
getReferencingRows ( integer $id, string $table, string | null $viaColumn = null, Filtering $filtering = null, string $strategy = null ) : Row[] Creates new array of Row instances pointing to requested row in referencing Result
getRow ( integer $id = null ) : Row | null Creates new Row instance pointing to specific row within Result
hasConnection ( ) : boolean
hasDataEntry ( mixed $id, string $column ) : boolean Tells whether row with given id has given column
isDetached ( ) : boolean Tells whether Result is in detached state (in means non-persisted)
isModified ( integer $id ) : boolean Tells whether requested row is in modified state
key ( ) : integer
markAsUpdated ( integer $id ) Marks requested row as non-modified (isModified returns false right after this method call)
next ( )
removeDataEntry ( array $values ) Removes given data entry
removeFromReferencing ( array $values, string $table, string | null $viaColumn = null, Filtering $filtering = null, string | null $strategy = self::STRATEGY_IN ) Remove given data entry from referencing Result
rewind ( )
setConnection ( Connection $connection )
setDataEntry ( mixed $id, string $key, mixed $value ) Sets value of given column in row with given id
setMapper ( leanmapper\IMapper $mapper )
setReferencedResult ( self $referencedResult, string $table, string $viaColumn = null )
setReferencingResult ( self $referencingResult, string $table, string $viaColumn = null, string $strategy = self::STRATEGY_IN )
unsetDataEntry ( mixed $id, string $column ) Unsets given column in row with given id
valid ( ) : boolean

비공개 메소드들

메소드 설명
__construct ( array $data = null, string | null $table = null, Connection $connection = null, leanmapper\IMapper $mapper = null )
applyFiltering ( Fluent $statement, Filtering $filtering ) : FilteringResult | null
buildUnionStrategySql ( array $ids, string $table, string $viaColumn, Filtering $filtering = null ) : mixed
calculateArgumentsHash ( array $arguments ) : string
createTableSelection ( string $table, array $relatedKeys = null ) : Fluent
extractIds ( string $column ) : array
getReferencedResult ( string $table, string $viaColumn, Filtering $filtering = null ) : self
getReferencingResult ( string $table, string $viaColumn = null, Filtering $filtering = null, string $strategy = self::STRATEGY_IN ) : self
isAlias ( string $column ) : boolean
translateStrategy ( string | null $strategy ) : string
trimAlias ( string $column ) : string

메소드 상세

__sleep() 공개 메소드

public __sleep ( ) : array
리턴 array

__wakeup() 공개 메소드

public __wakeup ( )

addDataEntry() 공개 메소드

Adds new data entry
public addDataEntry ( array $values )
$values array

addToReferencing() 공개 메소드

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

attach() 공개 메소드

public attach ( mixed $id, string $table )
$id mixed
$table string

cleanAddedAndRemovedMeta() 공개 메소드

cleanReferencedResultsCache() 공개 메소드

Cleans in-memory cache with referenced results
public cleanReferencedResultsCache ( 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 = self::STRATEGY_IN )
$table string
$viaColumn string | null
$filtering Filtering
$strategy string | null

cleanReferencingResultsCache() 공개 메소드

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

createDataDifference() 공개 메소드

Creates new DataDifference instance relevant to current Result state
public createDataDifference ( ) : DataDifference
리턴 DataDifference

createDetachedInstance() 공개 정적인 메소드

Creates new detached instance (it means non-persisted)
public static createDetachedInstance ( ) : self
리턴 self

createInstance() 공개 정적인 메소드

Creates new common instance (it means persisted)
public static createInstance ( Row | Row[] $data, string $table, Connection $connection, leanmapper\IMapper $mapper ) : self
$data Dibi\Row | Dibi\Row[]
$table string
$connection Connection
$mapper leanmapper\IMapper
리턴 self

createReferencingDataDifference() 공개 메소드

public createReferencingDataDifference ( string $table, string | null $viaColumn = null, Filtering $filtering = null, string | null $strategy = self::STRATEGY_IN ) : DataDifference
$table string
$viaColumn string | null
$filtering Filtering
$strategy string | null
리턴 DataDifference

current() 공개 메소드

public current ( ) : mixed
리턴 mixed

enableSerialization() 공개 정적인 메소드

public static enableSerialization ( Connection $connection )
$connection Connection

getData() 공개 메소드

Returns values of columns of requested row
public getData ( integer $id ) : array
$id integer
리턴 array

getDataEntry() 공개 메소드

Gets value of given column from row with given id
public getDataEntry ( mixed $id, string $key ) : mixed
$id mixed
$key string
리턴 mixed

getMapper() 공개 메소드

public getMapper ( ) : leanmapper\IMapper | null
리턴 leanmapper\IMapper | null

getModifiedData() 공개 메소드

Returns values of columns of requested row that were modified
public getModifiedData ( integer $id ) : array
$id integer
리턴 array

getProxy() 공개 메소드

public getProxy ( string $proxyClass ) : ResultProxy
$proxyClass string
리턴 ResultProxy

getReferencedRow() 공개 메소드

Creates new Row instance pointing to requested row in referenced Result
public getReferencedRow ( integer $id, string $table, string | null $viaColumn = null, Filtering $filtering = null ) : Row | null
$id integer
$table string
$viaColumn string | null
$filtering Filtering
리턴 Row | null

getReferencingRows() 공개 메소드

Creates new array of Row instances pointing to requested row in referencing Result
public getReferencingRows ( integer $id, string $table, string | null $viaColumn = null, Filtering $filtering = null, string $strategy = null ) : Row[]
$id integer
$table string
$viaColumn string | null
$filtering Filtering
$strategy string
리턴 Row[]

getRow() 공개 메소드

Creates new Row instance pointing to specific row within Result
public getRow ( integer $id = null ) : Row | null
$id integer
리턴 Row | null

hasConnection() 공개 메소드

public hasConnection ( ) : boolean
리턴 boolean

hasDataEntry() 공개 메소드

Tells whether row with given id has given column
public hasDataEntry ( mixed $id, string $column ) : boolean
$id mixed
$column string
리턴 boolean

isDetached() 공개 메소드

Tells whether Result is in detached state (in means non-persisted)
public isDetached ( ) : boolean
리턴 boolean

isModified() 공개 메소드

Tells whether requested row is in modified state
public isModified ( integer $id ) : boolean
$id integer
리턴 boolean

key() 공개 메소드

public key ( ) : integer
리턴 integer

markAsUpdated() 공개 메소드

Marks requested row as non-modified (isModified returns false right after this method call)
public markAsUpdated ( integer $id )
$id integer

next() 공개 메소드

public next ( )

removeDataEntry() 공개 메소드

Removes given data entry
public removeDataEntry ( array $values )
$values array

removeFromReferencing() 공개 메소드

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

rewind() 공개 메소드

public rewind ( )

setConnection() 공개 메소드

public setConnection ( Connection $connection )
$connection Connection

setDataEntry() 공개 메소드

Sets value of given column in row with given id
public setDataEntry ( mixed $id, string $key, mixed $value )
$id mixed
$key string
$value mixed

setMapper() 공개 메소드

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

setReferencedResult() 공개 메소드

public setReferencedResult ( self $referencedResult, string $table, string $viaColumn = null )
$referencedResult self
$table string
$viaColumn string

setReferencingResult() 공개 메소드

public setReferencingResult ( self $referencingResult, string $table, string $viaColumn = null, string $strategy = self::STRATEGY_IN )
$referencingResult self
$table string
$viaColumn string
$strategy string

unsetDataEntry() 공개 메소드

Unsets given column in row with given id
public unsetDataEntry ( mixed $id, string $column )
$id mixed
$column string

valid() 공개 메소드

public valid ( ) : boolean
리턴 boolean

프로퍼티 상세

$mapper 보호되어 있는 프로퍼티

protected IMapper,leanmapper $mapper
리턴 leanmapper\IMapper