Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
PhpCompat Class Reference
Inheritance diagram for PhpCompat:
CommandLineTool

Public Member Functions

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

Public Attributes

 $input_file
 
- Public Attributes inherited from CommandLineTool
 $argv
 
 $scriptName
 

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 phpcompat.inc.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 http://pear.php.net/manual/en/package.php.php-compatinfo.intro.php for information about detection accuracy.

Definition at line 47 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())

Constructor.

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

Definition at line 59 of file phpCompat.php.

References usage().

PhpCompat::usage ( )

Print command usage information.

Definition at line 88 of file phpCompat.php.

Referenced by PhpCompat().

Member Data Documentation

string PhpCompat::$input_file

the directory or file to be checked

Definition at line 52 of file phpCompat.php.


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