Class lajax\translatemanager\services\scanners\ScannerPhpFunction
Inheritance | lajax\translatemanager\services\scanners\ScannerPhpFunction » lajax\translatemanager\services\scanners\ScannerFile » yii\console\controllers\MessageController |
---|---|
Available since version | 1.0 |
Class for processing PHP files.
Language elements detected in PHP files: "t" functions:
::t('category of language element', 'language element');
::t('category of language element', 'language element {replace}', ['replace' => 'String']);
::t('category of language element', "language element");
::t('category of language element', "language element {replace}", ['replace' => 'String']);
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
$module | lajax\translatemanager\Module | TranslateManager Module | lajax\translatemanager\services\scanners\ScannerFile |
$scanner | lajax\translatemanager\services\Scanner | Object. | lajax\translatemanager\services\scanners\ScannerFile |
Protected Properties
Property | Type | Description | Defined By |
---|---|---|---|
$files | array | Array to store patsh to project files. | lajax\translatemanager\services\scanners\ScannerFile |
Public Methods
Method | Description | Defined By |
---|---|---|
__construct() | lajax\translatemanager\services\scanners\ScannerFile | |
init() | lajax\translatemanager\services\scanners\ScannerFile | |
run() | Start scanning PHP files. | lajax\translatemanager\services\scanners\ScannerPhpFunction |
Protected Methods
Method | Description | Defined By |
---|---|---|
checkTokens() | lajax\translatemanager\services\scanners\ScannerFile | |
concatMessage() | Recursice concatenation of multiple-piece language elements. | lajax\translatemanager\services\scanners\ScannerPhpFunction |
extractMessages() | Extracts messages from a file | lajax\translatemanager\services\scanners\ScannerFile |
getLanguageItem() | Returns language elements in the token buffer. | lajax\translatemanager\services\scanners\ScannerPhpFunction |
isValidCategory() | Determines whether the category received as a parameter can be processed. | lajax\translatemanager\services\scanners\ScannerFile |
Constants
Constant | Value | Description | Defined By |
---|---|---|---|
EXTENSION | '*.php' | Extension of PHP files. | lajax\translatemanager\services\scanners\ScannerPhpFunction |
Method Details
Recursice concatenation of multiple-piece language elements.
protected array concatMessage ( $buffer ) | ||
$buffer | array | Array to store language element pieces. |
return | array | Sorted list of language element pieces. |
---|
Returns language elements in the token buffer.
If there are no recognisable language elements in the array, returns null
protected array|null getLanguageItem ( $buffer ) | ||
$buffer | array |
Start scanning PHP files.
public void run ( $route, $params = [] ) | ||
$route | string | |
$params | array |