PHP 클래스 DB\Cursor

상속: extends Magic
파일 보기 프로젝트 열기: bcosca/fatfree-core 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$ptr @}
$query @}
$trigger @}

공개 메소드들

메소드 설명
aftererase ( $func ) : callback Define aftererase trigger
afterinsert ( $func ) : callback Define afterinsert trigger
aftersave ( $func ) : callback Define aftersave trigger
afterupdate ( $func ) : callback Define afterupdate trigger
beforeerase ( $func ) : callback Define beforeerase trigger
beforeinsert ( $func ) : callback Define beforeinsert trigger
beforesave ( $func ) : callback Define beforesave trigger
beforeupdate ( $func ) : callback Define beforeupdate trigger
cast ( $obj = NULL ) : array Return fields of mapper object as an associative array
copyfrom ( $var, $func = NULL ) : null Hydrate mapper object using hive array variable
copyto ( $key ) : null Populate hive array variable with mapper fields
count ( $filter = NULL, $ttl ) : integer Count records that match criteria
dbtype ( ) : string Return database type
dry ( ) : boolean Return TRUE if current cursor position is not mapped to any record
erase ( ) : integer | boolean Delete current record
fields ( ) : array Return field names
find ( $filter = NULL, array $options = NULL, $ttl ) : array Return records (array of mapper objects) that match criteria
findone ( $filter = NULL, array $options = NULL, $ttl ) : static | FALSE Return first record (mapper object) that matches criteria
first ( ) : mixed Map to first record in cursor
getiterator ( ) Get cursor's equivalent external iterator Causes a fatal error in PHP 5.3.5 if uncommented return ArrayIterator
insert ( ) : array Insert new record
last ( ) : mixed Map to last record in cursor
load ( $filter = NULL, array $options = NULL, $ttl ) : array | FALSE Map to first record that matches criteria
loaded ( ) : integer Return the count of records loaded
next ( ) : mixed Map next record
onerase ( $func ) : callback Define onerase trigger
oninsert ( $func ) : callback Define oninsert trigger
onload ( $func ) : callback Define onload trigger
onsave ( $func ) : callback Define onsave trigger
onupdate ( $func ) : callback Define onupdate trigger
paginate ( $pos, $size = 10, $filter = NULL, array $options = NULL, $ttl ) : array Return array containing subset of records matching criteria, total number of records in superset, specified limit, number of subsets available, and actual subset position
prev ( ) : mixed Map previous record
reset ( ) : null Reset cursor
save ( ) : mixed Save mapped record
skip ( $ofs = 1 ) : mixed Map to nth record relative to current cursor position
update ( ) : array Update current record
valid ( ) Return whether current iterator position is valid.

메소드 상세

aftererase() 공개 메소드

Define aftererase trigger
public aftererase ( $func ) : callback
$func callback
리턴 callback

afterinsert() 공개 메소드

Define afterinsert trigger
public afterinsert ( $func ) : callback
$func callback
리턴 callback

aftersave() 공개 메소드

Define aftersave trigger
public aftersave ( $func ) : callback
$func callback
리턴 callback

afterupdate() 공개 메소드

Define afterupdate trigger
public afterupdate ( $func ) : callback
$func callback
리턴 callback

beforeerase() 공개 메소드

Define beforeerase trigger
public beforeerase ( $func ) : callback
$func callback
리턴 callback

beforeinsert() 공개 메소드

Define beforeinsert trigger
public beforeinsert ( $func ) : callback
$func callback
리턴 callback

beforesave() 공개 메소드

Define beforesave trigger
public beforesave ( $func ) : callback
$func callback
리턴 callback

beforeupdate() 공개 메소드

Define beforeupdate trigger
public beforeupdate ( $func ) : callback
$func callback
리턴 callback

cast() 추상적인 공개 메소드

Return fields of mapper object as an associative array
abstract public cast ( $obj = NULL ) : array
$obj object
리턴 array

copyfrom() 추상적인 공개 메소드

Hydrate mapper object using hive array variable
abstract public copyfrom ( $var, $func = NULL ) : null
$var array|string
$func callback
리턴 null

copyto() 추상적인 공개 메소드

Populate hive array variable with mapper fields
abstract public copyto ( $key ) : null
$key string
리턴 null

count() 추상적인 공개 메소드

Count records that match criteria
abstract public count ( $filter = NULL, $ttl ) : integer
$filter array
$ttl int
리턴 integer

dbtype() 추상적인 공개 메소드

Return database type
abstract public dbtype ( ) : string
리턴 string

dry() 공개 메소드

Return TRUE if current cursor position is not mapped to any record
public dry ( ) : boolean
리턴 boolean

erase() 공개 메소드

Delete current record
public erase ( ) : integer | boolean
리턴 integer | boolean

fields() 추상적인 공개 메소드

Return field names
abstract public fields ( ) : array
리턴 array

find() 추상적인 공개 메소드

Return records (array of mapper objects) that match criteria
abstract public find ( $filter = NULL, array $options = NULL, $ttl ) : array
$filter string|array
$options array array
$ttl int
리턴 array

findone() 공개 메소드

Return first record (mapper object) that matches criteria
public findone ( $filter = NULL, array $options = NULL, $ttl ) : static | FALSE
$filter string|array
$options array array
$ttl int
리턴 static | FALSE

first() 공개 메소드

Map to first record in cursor
public first ( ) : mixed
리턴 mixed

getiterator() 추상적인 공개 메소드

Get cursor's equivalent external iterator Causes a fatal error in PHP 5.3.5 if uncommented return ArrayIterator
abstract public getiterator ( )

insert() 추상적인 공개 메소드

Insert new record
abstract public insert ( ) : array
리턴 array

last() 공개 메소드

Map to last record in cursor
public last ( ) : mixed
리턴 mixed

load() 공개 메소드

Map to first record that matches criteria
public load ( $filter = NULL, array $options = NULL, $ttl ) : array | FALSE
$filter string|array
$options array array
$ttl int
리턴 array | FALSE

loaded() 공개 메소드

Return the count of records loaded
public loaded ( ) : integer
리턴 integer

next() 공개 메소드

Map next record
public next ( ) : mixed
리턴 mixed

onerase() 공개 메소드

Define onerase trigger
public onerase ( $func ) : callback
$func callback
리턴 callback

oninsert() 공개 메소드

Define oninsert trigger
public oninsert ( $func ) : callback
$func callback
리턴 callback

onload() 공개 메소드

Define onload trigger
public onload ( $func ) : callback
$func callback
리턴 callback

onsave() 공개 메소드

Define onsave trigger
public onsave ( $func ) : callback
$func callback
리턴 callback

onupdate() 공개 메소드

Define onupdate trigger
public onupdate ( $func ) : callback
$func callback
리턴 callback

paginate() 공개 메소드

Return array containing subset of records matching criteria, total number of records in superset, specified limit, number of subsets available, and actual subset position
public paginate ( $pos, $size = 10, $filter = NULL, array $options = NULL, $ttl ) : array
$pos int
$size int
$filter string|array
$options array array
$ttl int
리턴 array

prev() 공개 메소드

Map previous record
public prev ( ) : mixed
리턴 mixed

reset() 공개 메소드

Reset cursor
public reset ( ) : null
리턴 null

save() 공개 메소드

Save mapped record
public save ( ) : mixed
리턴 mixed

skip() 공개 메소드

Map to nth record relative to current cursor position
public skip ( $ofs = 1 ) : mixed
$ofs int
리턴 mixed

update() 추상적인 공개 메소드

Update current record
abstract public update ( ) : array
리턴 array

valid() 공개 메소드

Return whether current iterator position is valid.
public valid ( )

프로퍼티 상세

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

@}
protected $ptr

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

@}
protected $query

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

@}
protected $trigger