eZ Publish Community Project (Legacy Stack) 2013.4
Class

ezpAutoloadCliOutput

class ezpAutoloadCliOutput implements ezpAutoloadOutput

Utility class for providing CLI output and incremental progress information.

Methods

__construct()

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 45
public __construct()

at line 63
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 83
public void initPhase1()

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

Return Value

void

at line 94
public void progressUpdatePhase1()

Pushes an progress update for file searching phase.

Return Value

void

at line 105
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 130
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 143
public void progressUpdatePhase2()

Pushes a progress update for class search phase.

Return Value

void

at line 155
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 170
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 191
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 203
public void updateProgress(int $phase)

Calls the correct phase progress update method depending on $phase

Parameters

int $phase

Return Value

void