PHP Класс lithium\g11n\catalog\Adapter

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

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

Метод Описание
read ( string $category, string $locale, string $scope ) : null Reads data.
write ( string $category, string $locale, string $scope, array $data ) : false Writes data.

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

Метод Описание
_merge ( array $data, array $item ) : array Merges an item into given data.
_prepareForWrite ( array $item ) : array Prepares an item before it is being written.

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

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

Merges an item into given data.
protected _merge ( array $data, array $item ) : array
$data array Data to merge item into.
$item array Item to merge into $data. The item must have an `'id'` key.
Результат array The merged data.

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

Override this method in sublcasses if you need to i.e. escape the item's values.
protected _prepareForWrite ( array $item ) : array
$item array
Результат array

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

Override this method in subclasses if you want the adapter to have read support. The method is expected to return null if the passed category is not supported.
public read ( string $category, string $locale, string $scope ) : null
$category string A category.
$locale string A locale identifier.
$scope string The scope for the current operation.
Результат null This currently does nothing.

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

Override this method in subclasses if you want the adapter to have write support. The method is expected to return false if the passed category is not supported. Please note that existing data is silently overwritten.
public write ( string $category, string $locale, string $scope, array $data ) : false
$category string A category.
$locale string A locale identifier.
$scope string The scope for the current operation.
$data array The data to write.
Результат false This currently does nothing.