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

Public Member Functions

 __construct ($log, $rotation_index=NULL)
 
 getLogSize ($log, $rotation_index)
 
 getNextEntry ()
 
 getCurrentProgress ()
 

Protected Member Functions

 _getLogLine ($file, $offset)
 
 _decodeLine ($line)
 

Protected Attributes

 $offset
 
 $log
 
 $rotation_index
 
 $total_size
 
 $blank_query
 

Detailed Description

Definition at line 26 of file funnelback_log_iterator.inc.

Constructor & Destructor Documentation

__construct (   $log,
  $rotation_index = NULL 
)

Constructor

Parameters
string$logthe 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 44 of file funnelback_log_iterator.inc.

Member Function Documentation

_decodeLine (   $line)
protected

Decode the line to something useful for us to work with

Log Format: [DATE_TIME][REQUESTER_IP][QUERY][INCLUDE_SCOPE][EXCLUDE_SCOPE][START_RANK][NUM_RANKS][CODES][FULL_MATCHES][PARTIAL_MATCHES][ELAPSED_TIME][PROFILE]

Parameters
string$lineThe line to decode
Returns
array public

Definition at line 184 of file funnelback_log_iterator.inc.

_getLogLine (   $file,
  $offset 
)
protected

Get the requested log line

Parameters
string$fileThe file to open
int$offsetThe current position in the file
Returns
array|FALSE public

Definition at line 144 of file funnelback_log_iterator.inc.

getCurrentProgress ( )

Return the current progress in the form of a percentage

Returns
array public

Definition at line 123 of file funnelback_log_iterator.inc.

getLogSize (   $log,
  $rotation_index 
)

Get the size of the log

Parameters
string$logThe path to the log file
int$rotation_indexthe rotation index of the log to act on, NULL to act on the current log
Returns
int public

Definition at line 71 of file funnelback_log_iterator.inc.

getNextEntry ( )

Gets the next entry from the log

Returns the next line as an array or FALSE on failure

Returns
mixed boolean|array public

Definition at line 94 of file funnelback_log_iterator.inc.


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