PHP_CompatInfo
[ class tree: PHP_CompatInfo ] [ index: PHP_CompatInfo ] [ all elements ]

Class: PHP_CompatInfo

Source Location: /CompatInfo.php

Class Overview


Check Compatibility of chunk of PHP code


Author(s):

Copyright:

  • Copyright 2003 Davey Shafik and Synaptic Media. All Rights Reserved.

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 55]
Check Compatibility of chunk of PHP code



Tags:

example:  Example on using using parseArray() to parse a script
example:  Example on how to parse a string
example:  Example on how to parse a folder
example:  Example on how to parse a file
copyright:  Copyright 2003 Davey Shafik and Synaptic Media. All Rights Reserved.
example:  Example that shows minimum version with Constants
author:  Davey Shafik <davey@php.net>


[ Top ]


Class Variables

$latest_version =  '4.0.0'

[line 61]



Tags:

var:  Earliest version of PHP to use

Type:   string


[ Top ]

$recurse_dir =  true

[line 67]



Tags:

var:  Toggle parseFolder recursion

Type:   boolean


[ Top ]



Class Methods


method parseArray [line 228]

array parseArray( array $files, [array $options = null])

Parse an Array of Files

You can parse an array of Files or Strings, to parse strings, $options['is_string'] must be set to true




Tags:

access:  public


Parameters:

array   $files   Array of file names or code strings
array   $options   An array of options where: 'debug' contains a boolean to control whether extra ouput is shown. 'is_string' contains a boolean which says if the array values are strings or file names. 'ignore_files' contains an array of files to ignore. File names are case sensitive. 'ignore_functions' contains an array of functions to ignore when calculating the version needed.

[ Top ]

method parseFile [line 84]

Array parseFile( string $file, [array $options = null])

Parse a file for its Compatibility info



Tags:

access:  public


Parameters:

string   $file   Path of File to parse
array   $options   An array of options where: 'debug' contains a boolean to control whether extra ouput is shown. 'ignore_functions' contains an array of functions to ignore when calculating the version needed.

[ Top ]

method parseFolder [line 145]

array parseFolder( string $folder, [array $options = null])

Parse a folder recursively for its Compatibility info



Tags:

access:  public


Parameters:

string   $folder   Path of folder to parse
array   $options   Array of user options where: 'file_ext' Contains an array of file extensions to parse for PHP code. Default: php, php4, inc, phtml 'recurse_dir' Boolean on whether to recursively find files 'debug' contains a boolean to control whether extra ouput is shown. 'ignore_files' contains an array of files to ignore. File names are case insensitive. 'ignore_dirs' contains an array of directories to ignore. Directory names are case insensitive. 'ignore_functions' contains an array of functions to ignore when calculating the version needed.

[ Top ]

method parseString [line 108]

Array parseString( string $string, [array $options = null])

Parse a string for its Compatibility info



Tags:

access:  public


Parameters:

string   $string   PHP Code to parses
array   $options   An array of options where: 'debug' contains a boolean to control whether extra ouput is shown. 'ignore_functions' contains an array of functions to ignore when calculating the version needed.

[ Top ]

method _fileList [line 389]

array _fileList( string $directory, mixed $options)

Retrieve a listing of every file in $directory and all subdirectories. Taken from PEAR_PackageFileManager_File



Tags:

return:  list of files in a directory
access:  private


Parameters:

string   $directory   full path to the directory you want the list of

[ Top ]

method _parseTokens [line 284]

array _parseTokens( array $tokens, mixed $options, boolean $debug)

Parse the given Tokens

The tokens are those returned by token_get_all() which is nicely wrapped in PHP_CompatInfo::_tokenize




Tags:

access:  private


Parameters:

array   $tokens   Array of PHP Tokens
boolean   $debug   Show Extra Output

[ Top ]

method _tokenize [line 367]

array _tokenize( string $input, [boolean $is_string = false])

Token a file or string



Tags:

access:  private


Parameters:

string   $input   Filename or PHP code
boolean   $is_string   Whether or note the input is a string

[ Top ]


Documentation generated on Tue, 9 Mar 2004 18:21:04 +0000 by phpDocumentor 1.3.0RC2. PEAR Logo Copyright © PHP Group 2004.