PHP Class lithium\g11n\catalog\adapter\Php
An example PHP file must contain a
return statement which returns an array if the
the file is included.
{{{
'\d+',
'phone' => '\d+\-\d+'
);
?>
}}}
The adapter works with a directory structure below. The example shows the structure
for the directory as given by the
'path' configuration setting. It is similar to
the one used by the the
Gettext adapter.
{{{
resources/g11n/php
├──
| ├── message
| | ├── default.php
| | └── .php
| ├── validation
| | └── ...
| └── ...
├──
| └── ...
├── message_default.php
├── message_.php
├── validation_default.php
├── validation_.php
└── ...
}}}
ファイルを表示
Open project: unionofrad/lithium
Public Methods
Protected Methods
Method |
Description |
|
_file ( string $category, string $locale, string $scope ) : string |
Helper method for transforming a category, locale and scope into a filename. |
|
_init ( ) : void |
Initializer. Checks if the configured path exists. |
|
Method Details
__construct()
public method
public __construct ( array $config = [] ) : void |
$config |
array |
Available configuration options are:
- `'path'`: The path to the directory holding the data. |
return |
void |
|
Helper method for transforming a category, locale and scope into a filename.
Initializer. Checks if the configured path exists.