lithium\g11n\catalog\adapter\Memory::write()
Overrides
lithium\g11n\catalog\Adapter::write()
Writes data.
Parameters
-
string
$category
A category.
-
string
$locale
A locale identifier.
-
string
$scope
The scope for the current operation.
-
array
$data
The data to write.
Returns
booleanSource
public function write($category, $locale, $scope, array $data) {
$scope = $scope ?: 'default';
if (!isset($this->_data[$scope][$category][$locale])) {
$this->_data[$scope][$category][$locale] = array();
}
foreach ($data as $item) {
$this->_data[$scope][$category][$locale] = $this->_merge(
$this->_data[$scope][$category][$locale],
$this->_prepareForWrite($item)
);
}
return true;
}