PHP 클래스 lithium\g11n\catalog\Adapter

상속: extends lithium\core\Object
파일 보기 프로젝트 열기: unionofrad/lithium 1 사용 예제들

공개 메소드들

메소드 설명
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.