PHP Class lajax\translatemanager\services\Scanner

Since: 1.1
Author: Lajos Molnár ([email protected])
Afficher le fichier Open project: lajax/yii2-translate-manager Class Usage Examples

Méthodes publiques

Свойство Type Description
$scanners List of language element classes

Méthodes publiques

Méthode Description
addLanguageItem ( string $category, string $message ) Adding language elements to the array.
addLanguageItems ( array $languageItems ) Adding language elements to the array.
getLanguageItems ( ) : array Returns existing language elements.
getNewLanguageElements ( ) : array Returns new language elements.
getRemovableLanguageSourceIds ( ) : array Returns removable LanguageSource ids.
run ( ) : integer Scanning project for text not stored in database.
scanning ( ) : integer Scanning project for text not stored in database.
stdout ( string $string ) Prints a string to STDOUT

Private Methods

Méthode Description
_initLanguageArrays ( ) Initialising $_languageItems and $_removableLanguageSourceIds arrays.
_scanningProject ( ) Scan project for new language elements.

Method Details

addLanguageItem() public méthode

Adding language elements to the array.
public addLanguageItem ( string $category, string $message )
$category string
$message string

addLanguageItems() public méthode

Adding language elements to the array.
public addLanguageItems ( array $languageItems )
$languageItems array example: ~~~ [ [ 'category' => 'language', 'message' => 'Active' ], [ 'category' => 'language', 'message' => 'Inactive' ], ] ~~~

getLanguageItems() public méthode

Returns existing language elements.
Deprecation: since version 1.4.2
public getLanguageItems ( ) : array
Résultat array associative array containing the language elements.

getNewLanguageElements() public méthode

Returns new language elements.
public getNewLanguageElements ( ) : array
Résultat array associative array containing the new language elements.

getRemovableLanguageSourceIds() public méthode

Returns removable LanguageSource ids.
public getRemovableLanguageSourceIds ( ) : array
Résultat array

run() public méthode

Scanning project for text not stored in database.
public run ( ) : integer
Résultat integer The number of new language elements.

scanning() public méthode

Scanning project for text not stored in database.
Deprecation: since version 1.4
public scanning ( ) : integer
Résultat integer The number of new language elements.

stdout() public méthode

Prints a string to STDOUT
public stdout ( string $string )
$string string

Property Details

$scanners public_oe property

List of language element classes
public $scanners