PHP Класс Clockwork\Storage\SqlStorage

Наследование: extends Storage
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$needs_serialization List of Request keys that need to be serialized before they can be stored in database
$pdo PDO instance
$table Name of the table with Clockwork requests metadata

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

Метод Описание
__construct ( $dsn, $table = 'clockwork', $username = null, $password = null ) Return a new storage, takes PDO object or DSN and optionally a table name and database credentials as arguments
initialize ( ) Create the Clockwork metadata table if it doesn't exist
retrieve ( $id = null, $last = null ) Retrieve a request specified by id argument, if second argument is specified, array of requests from id to last will be returned
store ( Request $request ) Store the request in the database

Защищенные методы

Метод Описание
createRequestFromData ( $data )

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

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

Return a new storage, takes PDO object or DSN and optionally a table name and database credentials as arguments
public __construct ( $dsn, $table = 'clockwork', $username = null, $password = null )

createRequestFromData() защищенный Метод

protected createRequestFromData ( $data )

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

Create the Clockwork metadata table if it doesn't exist
public initialize ( )

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

Retrieve a request specified by id argument, if second argument is specified, array of requests from id to last will be returned
public retrieve ( $id = null, $last = null )

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

Store the request in the database
public store ( Request $request )
$request Clockwork\Request\Request

Описание свойств

$needs_serialization защищенное свойство

List of Request keys that need to be serialized before they can be stored in database
protected $needs_serialization

$pdo защищенное свойство

PDO instance
protected $pdo

$table защищенное свойство

Name of the table with Clockwork requests metadata
protected $table