lithium\g11n\catalog\adapter\Gettext::write PHP Method

write() public method

Writes data.
public write ( string $category, string $locale, string $scope, array $data ) : boolean
$category string A category.
$locale string A locale identifier.
$scope string The scope for the current operation.
$data array The data to write.
return boolean
    public function write($category, $locale, $scope, array $data)
    {
        $files = $this->_files($category, $locale, $scope);
        foreach ($files as $file) {
            $method = '_compile' . ucfirst(pathinfo($file, PATHINFO_EXTENSION));
            if (!($stream = fopen($file, 'wb'))) {
                return false;
            }
            $this->invokeMethod($method, array($stream, $data));
            fclose($stream);
        }
        return true;
    }