Class lajax\translatemanager\services\Scanner

Inheritancelajax\translatemanager\services\Scanner
Available since version1.0

Scanner class for scanning project, detecting new language elements

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$scanners array List of language element classes lajax\translatemanager\services\Scanner

Public Methods

Hide inherited methods

MethodDescriptionDefined By
addLanguageItem() Adding language elements to the array. lajax\translatemanager\services\Scanner
addLanguageItems() Adding language elements to the array. lajax\translatemanager\services\Scanner
getLanguageItems() Returns existing language elements. lajax\translatemanager\services\Scanner
getNewLanguageElements() Returns new language elements. lajax\translatemanager\services\Scanner
getRemovableLanguageSourceIds() Returns removable LanguageSource ids. lajax\translatemanager\services\Scanner
run() Scanning project for text not stored in database. lajax\translatemanager\services\Scanner
scanning() Scanning project for text not stored in database. lajax\translatemanager\services\Scanner
stdout() Prints a string to STDOUT lajax\translatemanager\services\Scanner

Constants

Hide inherited constants

ConstantValueDescriptionDefined By
CATEGORY_ARRAY 'array' Array category. lajax\translatemanager\services\Scanner
CATEGORY_DATABASE 'database' Database category. lajax\translatemanager\services\Scanner
CATEGORY_JAVASCRIPT 'javascript' JavaScript category. lajax\translatemanager\services\Scanner

Property Details

$scanners public property

List of language element classes

public array $scanners = ['\lajax\translatemanager\services\scanners\ScannerPhpFunction''\lajax\translatemanager\services\scanners\ScannerPhpArray''\lajax\translatemanager\services\scanners\ScannerJavaScriptFunction''\lajax\translatemanager\services\scanners\ScannerDatabase']

Method Details

addLanguageItem() public method

Adding language elements to the array.

public void addLanguageItem ( $category, $message )
$category string
$message string
addLanguageItems() public method

Adding language elements to the array.

public void addLanguageItems ( $languageItems )
$languageItems array

Example:

[
     [
         'category' => 'language',
         'message' => 'Active'
     ],
     [
         'category' => 'language',
         'message' => 'Inactive'
     ],
]
getLanguageItems() public method

Returns existing language elements.

public array getLanguageItems ( )
return array

Associative array containing the language elements.

getNewLanguageElements() public method

Returns new language elements.

public array getNewLanguageElements ( )
return array

Associative array containing the new language elements.

getRemovableLanguageSourceIds() public method

Returns removable LanguageSource ids.

public array getRemovableLanguageSourceIds ( )
run() public method

Scanning project for text not stored in database.

public integer run ( )
return integer

The number of new language elements.

scanning() public method

Scanning project for text not stored in database.

public integer scanning ( )
return integer

The number of new language elements.

stdout() public method

Prints a string to STDOUT

public void stdout ( $string )
$string string