PHP 클래스 LazyRecord\Metadata

상속: implements ArrayAcces\ArrayAccess, implements IteratorAggregat\IteratorAggregate
파일 보기 프로젝트 열기: corneltek/lazyrecord 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$connection PDO connection object
$driver QueryDriver from SQLBuilder

공개 메소드들

메소드 설명
__construct ( PDO $connection, BaseDriver $driver ) Users can store different metadata in the different data sources.
createWithDataSource ( $dsId )
getAttribute ( string $key ) Get an attribute value from the database source.
getIterator ( ) : ArrayIterator Get iterator for the key-value pair data.
getKeyValues ( )
getKeys ( )
getValues ( )
getVersion ( ) : integer Get the current version number from the key-value store.
hasAttribute ( string $key ) Check if a key exists in the database.
init ( ) This method initialize the metadata table if needed.
offsetExists ( string $key ) Check if a key exists.
offsetGet ( string $key )
offsetSet ( string $key, string $value ) Set a value with a key.
offsetUnset ( string $key )
removeAttribute ( string $key ) Remove an attribute from the database source.
setAttribute ( string $key, string $value ) Set an attribute.

메소드 상세

__construct() 공개 메소드

This constructor requires the first parameter to be the data source Id to initialize the metadata object.
public __construct ( PDO $connection, BaseDriver $driver )
$connection PDO
$driver SQLBuilder\Driver\BaseDriver

createWithDataSource() 공개 정적인 메소드

public static createWithDataSource ( $dsId )

getAttribute() 공개 메소드

Get an attribute value from the database source.
public getAttribute ( string $key )
$key string

getIterator() 공개 메소드

Please note this method does not cache the meta data, if you call this method, this method will do another SQL query to fetch all the attribute

getKeyValues() 공개 메소드

public getKeyValues ( )

getKeys() 공개 메소드

public getKeys ( )

getValues() 공개 메소드

public getValues ( )

getVersion() 공개 메소드

Get the current version number from the key-value store.
public getVersion ( ) : integer
리턴 integer version number

hasAttribute() 공개 메소드

Check if a key exists in the database.
public hasAttribute ( string $key )
$key string

init() 공개 메소드

This method initialize the metadata table if needed.
public init ( )

offsetExists() 공개 메소드

Check if a key exists.
public offsetExists ( string $key )
$key string

offsetGet() 공개 메소드

public offsetGet ( string $key )
$key string

offsetSet() 공개 메소드

Set a value with a key.
public offsetSet ( string $key, string $value )
$key string the key
$value string the value

offsetUnset() 공개 메소드

public offsetUnset ( string $key )
$key string

removeAttribute() 공개 메소드

Remove an attribute from the database source.
public removeAttribute ( string $key )
$key string

setAttribute() 공개 메소드

Set an attribute.
public setAttribute ( string $key, string $value )
$key string
$value string

프로퍼티 상세

$connection 공개적으로 프로퍼티

PDO connection object
public $connection

$driver 공개적으로 프로퍼티

QueryDriver from SQLBuilder
public $driver