PHP Класс LazyRecord\Metadata

Наследование: implements ArrayAcces\ArrayAccess, implements IteratorAggregat\IteratorAggregate
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$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
public getIterator ( ) : ArrayIterator
Результат ArrayIterator

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