PHP Class luya\console\Importer

Abstract importer class provides basic funcionality to access the helper class via getImporter(). Each importer class must have run() method where the basic logic of the class will be executed. php class XyzImporter extends \luya\console\Importer { public function run() { $this->addLog('XyzImporter have been started'); importer logic goes here } }
Author: Basil Suter ([email protected])
Inheritance: extends yii\base\Object
Datei anzeigen Open project: luyadev/luya

Public Properties

Property Type Description
$queueListPosition The priority between 0 and 100 where to Import command should be queued. + 0 = First + 100 = Last

Public Methods

Method Description
__construct ( luya\console\interfaces\ImportControllerInterface $importer, $config = [] ) Class constructor containing the importer object from where its called.
addLog ( string $value ) Add something to the output. Wrapper method from importer.
getImporter ( ) : object Returns the import object to use the importers methods.
run ( ) Each Importer Class must contain a run method.

Method Details

__construct() public method

Class constructor containing the importer object from where its called.
public __construct ( luya\console\interfaces\ImportControllerInterface $importer, $config = [] )
$importer luya\console\interfaces\ImportControllerInterface Import Object `\luya\commands\ImportController`.

addLog() public method

php $this->addLog('new block have been found and added to database');
public addLog ( string $value )
$value string The value to be written for the log output.

getImporter() public method

Returns the import object to use the importers methods.
public getImporter ( ) : object
return object Import \luya\console\interfaces\ImportControllerInterface

run() abstract public method

Each Importer Class must contain a run method.
abstract public run ( )

Property Details

$queueListPosition public_oe property

The priority between 0 and 100 where to Import command should be queued. + 0 = First + 100 = Last
public $queueListPosition