Class lajax\translatemanager\services\scanners\ScannerPhpArray
Inheritance | lajax\translatemanager\services\scanners\ScannerPhpArray » lajax\translatemanager\services\scanners\ScannerFile » yii\console\controllers\MessageController |
---|---|
Available since version | 1.0 |
Class for processing PHP files.
Language elements detected in constant arrays:
/**
* @translate
*/
private $_GENDERS = ['Male', 'Female'];
/**
* @translate
*/
private $_STATUSES = [
self::STATUS_ACTIVE => 'Active',
self::STATUS_INACTIVE => 'Inactive'
];
Translation of constant arrays: Translation to site language:
$genders = \lajax\translatemanager\helpers\Language::a($this->_GENDERS);
Translating to the language of your coice:
$statuses = \lajax\translatemanager\helpers\Language::a($this->_STATUSES, [], 'de-DE');
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\ScannerPhpArray |
Protected Methods
Method | Description | Defined By |
---|---|---|
checkTokens() | lajax\translatemanager\services\scanners\ScannerFile | |
extractMessages() | Extracts messages from a file | lajax\translatemanager\services\scanners\ScannerFile |
getLanguageItem() | Returns language elements in the token buffer. | lajax\translatemanager\services\scanners\ScannerPhpArray |
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\ScannerPhpArray |