Class lajax\projectscanner\Scanner
| Inheritance | lajax\projectscanner\Scanner » yii\base\Component |
|---|---|
| Uses Traits | lajax\projectscanner\ConsoleOutputTrait |
| Available since version | 1.0 |
Scanner component for scanning project, detecting new language elements
Public Properties
| Property | Type | Description | Defined By |
|---|---|---|---|
| $ignoredCategories | array | List of the categories being ignored. | lajax\projectscanner\Scanner |
| $ignoredItems | array | Directories/files being ignored. | lajax\projectscanner\Scanner |
| $patterns | array | List of file extensions that contain language elements. | lajax\projectscanner\Scanner |
| $roots | array | The root directory of the scanning. | lajax\projectscanner\Scanner |
| $scanTimeLimit | integer | The max_execution_time used when scanning, when set to null the default max_execution_time will not be modified. | lajax\projectscanner\Scanner |
| $scanners | lajax\projectscanner\scanners\ScannerInterface | lajax\projectscanner\Scanner |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| addLanguageItem() | Adding language elements to the array. | lajax\projectscanner\Scanner |
| addLanguageItems() | Adding language elements to the array. | lajax\projectscanner\Scanner |
| execute() | Scanning project for text not stored in database. | lajax\projectscanner\Scanner |
| init() | lajax\projectscanner\Scanner | |
| isColorEnabled() | Returns a value indicating whether ANSI color is enabled. | lajax\projectscanner\ConsoleOutputTrait |
| loadScanner() | Loads the scanner with the specified ID. | lajax\projectscanner\Scanner |
| stderr() | Prints a string to STDERR | lajax\projectscanner\ConsoleOutputTrait |
| stdout() | Prints a string to STDOUT | lajax\projectscanner\ConsoleOutputTrait |
Protected Methods
| Method | Description | Defined By |
|---|---|---|
| coreScanners() | Returns the list of the core scanner configurations. | lajax\projectscanner\Scanner |
| initRoots() | Initializing the root directories of the scaning. | lajax\projectscanner\Scanner |
Property Details
List of the categories being ignored.
Directories/files being ignored.
List of file extensions that contain language elements. Only files with these extensions will be processed.
The root directory of the scanning.
The max_execution_time used when scanning, when set to null the default max_execution_time will not be modified.
Method Details
Adding language elements to the array.
| public void addLanguageItem ( $category, $message ) | ||
| $category | string | Category of the language element. |
| $message | string | The languageElement. |
Adding language elements to the array.
| public void addLanguageItems ( $languageItems ) | ||
| $languageItems | array | Example:
|
Returns the list of the core scanner configurations.
| protected array coreScanners ( ) | ||
| return | array | The list of the core scanner configurations. |
|---|---|---|
Scanning project for text not stored in database.
| public lajax\projectscanner\ScanResult execute ( ) |
| public void init ( ) |
Initializing the root directories of the scaning.
| protected void initRoots ( ) |
Loads the scanner with the specified ID.
| public lajax\projectscanner\scanners\ScannerInterface loadScanner ( $id ) | ||
| $id | string | The ID of the scanner to be loaded. |
| return | lajax\projectscanner\scanners\ScannerInterface | The loaded scanner |
|---|---|---|
| throws | \lajax\projectscanner\NotFoundHttpException | |