Open Journal Systems  2.4.3
 All Classes Namespaces Functions Variables Groups Pages
PhpCompat Class Reference
Inheritance diagram for PhpCompat:

Public Member Functions

 execute ()
 PhpCompat ($argv=array())
 usage ()

Additional Inherited Members

- Public Attributes inherited from CommandLineTool

Detailed Description

A small wrapper script around PEAR's PHP_CompatInfo package to test PHP version compatibility.

This script may be used standalone, as an external tool in your favourite development environment or within the build process.

Usage: php input_file|input_directory

Installation Requirements: pear install PHP_CompatInfo pear install Console_ProgressBar

To install as an Eclipse external tool: Main tab: Location: /path/to/your/php.exe Working Directory: ${workspace_loc:/your-project} Arguments: ${project_loc}/lib/pkp/tools/phpCompat.php "${resource_loc}"

Common tab: Check "Display in favorites menu" -> "External Tools" Check "Allocate Console"

Please see for information about detection accuracy.

Definition at line 50 of file phpCompat.php.

Member Function Documentation

PhpCompat::execute ( )

Parse the given file or directory and determine the minimum PHP version needed to execute the code.

Definition at line 98 of file phpCompat.php.

PhpCompat::PhpCompat (   $argv = array())


$argvarray command-line arguments The first argument must be the file to check

Definition at line 59 of file phpCompat.php.

References CommandLineTool\$argv, and usage().

PhpCompat::usage ( )

Print command usage information.

Definition at line 88 of file phpCompat.php.

Referenced by PhpCompat().

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