Class

ezpAutoloadCliOutput

class ezpAutoloadCliOutput implements ezpAutoloadOutput

Utility class for providing CLI output and incremental progress information.

Methods

void __construct(bool|null $quiet = false)

Constructor of the ezpAutoloadCliOutput class

void outputCli(string $message, string $type)

Outputs a $message on the CLI, and formats it according to type.

void initPhase1()

Sets up the class for handling progress information for file searching phase.

void progressUpdatePhase1()

Pushes an progress update for file searching phase.

void finishPhase1()

Closes down progress update for phase 1, also inserts some newlines to make sure output is displayed nicely.

void initPhase2()

Sets up the class for displaying progress information for class search phase.

void progressUpdatePhase2()

Pushes a progress update for class search phase.

void finishPhase2()

Finishes progress output for class search phase.

array getData(int $phase)

Returns data array used to keep statistical information for each $phase.

void updateData(int $phase, array $data)

Updates the internal data array for each $phase

void updateProgress(int $phase)

Calls the correct phase progress update method depending on $phase

Details

at line 52
public void __construct(bool|null $quiet = false)

Constructor of the ezpAutoloadCliOutput class

Parameters

bool|null $quiet True to not display any messages/warnings to the output. False / null to display all messages.

Return Value

void

at line 71
public void outputCli(string $message, string $type)

Outputs a $message on the CLI, and formats it according to type.

Currently $type of "normal" and "warning" is supported.

Parameters

string $message
string $type

Return Value

void

at line 91
public void initPhase1()

Sets up the class for handling progress information for file searching phase.

Return Value

void

at line 102
public void progressUpdatePhase1()

Pushes an progress update for file searching phase.

Return Value

void

at line 113
public void finishPhase1()

Closes down progress update for phase 1, also inserts some newlines to make sure output is displayed nicely.

Return Value

void

at line 138
public void initPhase2()

Sets up the class for displaying progress information for class search phase.

This method expects the total file count to be present in the internal $data array.

Example: $statArray = array( 'nFiles' => count( $fileList ), 'classCount' => 0, 'classAdded' => 0, );

This array can set via the updateData() function.

Return Value

void

See also

function updateData

at line 151
public void progressUpdatePhase2()

Pushes a progress update for class search phase.

Return Value

void

at line 163
public void finishPhase2()

Finishes progress output for class search phase.

Also inserts some extra newlines to make the output clearer.

Return Value

void

at line 178
public array getData(int $phase)

Returns data array used to keep statistical information for each $phase.

Parameters

int $phase

Return Value

array

See also

eZAutoloadGenerator::OUTPUT_PROGRESS_PHASE1
eZAutoloadGenerator::OUTPUT_PROGRESS_PHASE2

at line 199
public void updateData(int $phase, array $data)

Updates the internal data array for each $phase

Parameters

int $phase
array $data

Return Value

void

at line 211
public void updateProgress(int $phase)

Calls the correct phase progress update method depending on $phase

Parameters

int $phase

Return Value

void