Open Journal Systems  3.3.0
CopyAccessLogFileTool Class Reference
Inheritance diagram for CopyAccessLogFileTool:
CommandLineTool

Public Member Functions

 __construct ($argv=array())
 
 _copyFile ($filePath)
 
 execute ()
 
 usage ()
 

Data Fields

 $_contextPaths
 
 $_egrepPath
 
 $_tmpDir
 
 $_usageStatsDir
 
 $_usageStatsFiles
 
- Data Fields inherited from CommandLineTool
 $argv
 
 $scriptName
 

Detailed Description

CLI tool to copy apache log files while filtering entries related only to the current instalation.

Definition at line 22 of file copyAccessLogFileTool.php.

Constructor & Destructor Documentation

◆ __construct()

CopyAccessLogFileTool::__construct (   $argv = array())

Constructor.

Parameters
$argvarray command-line arguments

Reimplemented from CommandLineTool.

Definition at line 38 of file copyAccessLogFileTool.php.

References CommandLineTool\$argv, Application\getContextDAO(), PluginRegistry\getPlugin(), Config\getVar(), AppLocale\requireComponents(), and usage().

Member Function Documentation

◆ _copyFile()

CopyAccessLogFileTool::_copyFile (   $filePath)

Copy the passed file, filtering entries related to this installation.

Parameters
$filePathstring

Definition at line 158 of file copyAccessLogFileTool.php.

References $_egrepPath, $_tmpDir, $_usageStatsDir, and $_usageStatsFiles.

Referenced by execute().

◆ execute()

CopyAccessLogFileTool::execute ( )

Process apache log files, copying and filtering them to the usage stats stage directory. Can work with both a specific file or a directory.

Definition at line 106 of file copyAccessLogFileTool.php.

References $_tmpDir, $_usageStatsDir, _copyFile(), and Config\getVar().

◆ usage()

CopyAccessLogFileTool::usage ( )

Print command usage information.

Reimplemented from CommandLineTool.

Definition at line 97 of file copyAccessLogFileTool.php.

Referenced by __construct().

Field Documentation

◆ $_contextPaths

CopyAccessLogFileTool::$_contextPaths

Definition at line 30 of file copyAccessLogFileTool.php.

◆ $_egrepPath

CopyAccessLogFileTool::$_egrepPath

Definition at line 32 of file copyAccessLogFileTool.php.

Referenced by _copyFile().

◆ $_tmpDir

CopyAccessLogFileTool::$_tmpDir

Definition at line 26 of file copyAccessLogFileTool.php.

Referenced by _copyFile(), and execute().

◆ $_usageStatsDir

CopyAccessLogFileTool::$_usageStatsDir

Definition at line 24 of file copyAccessLogFileTool.php.

Referenced by _copyFile(), and execute().

◆ $_usageStatsFiles

CopyAccessLogFileTool::$_usageStatsFiles

Definition at line 28 of file copyAccessLogFileTool.php.

Referenced by _copyFile().


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