Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
Log_Iterator Class Reference

Public Member Functions

 __construct ($logname, $rotation_index=NULL)
 
 getNextEntry ()
 
 getLastEntry ()
 
getCurrentProgress ()
 

Protected Attributes

 $offset
 
 $logname
 
 $rotation_index
 
 $total_size
 

Detailed Description

Definition at line 28 of file log_iterator.inc.

Constructor & Destructor Documentation

__construct (   $logname,
  $rotation_index = NULL 
)

Constructor

Parameters
string$lognamethe log to act on
int$rotation_indexthe rotation index of the log to act on, NULL to act on the current log

Definition at line 45 of file log_iterator.inc.

Member Function Documentation

& getCurrentProgress ( )

Return the current progress in the form of a percentage

The returned array is in the format:

Array(
      'percentage_done' => int      // the current progress in the form of a percentage
      'complete'        => boolean  // whether the read is complete
      )
Returns
array public

Definition at line 125 of file log_iterator.inc.

getLastEntry ( )

Gets the last entry from the log manager

Returns the last line as an array or FALSE on failure

Returns
mixed boolean|array public

Definition at line 97 of file log_iterator.inc.

getNextEntry ( )

Gets the next entry from log manager

Returns the next line as an array or FALSE on failure

Returns
mixed boolean|array public

Definition at line 69 of file log_iterator.inc.


The documentation for this class was generated from the following file: