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

Class: PHP_CompatInfo_Parser

Source Location: /PHP_CompatInfo-1.9.0/CompatInfo/Parser.php

Class Overview


Parser logic


Author(s):

Version:

  • Release: 1.9.0

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 106]
Parser logic

This class is the model in the MVC design pattern of API 1.8.0 (since beta 2)



[ Top ]


Class Variables

$dataSource =

[line 157]

  • Var: Data Source
  • Since: 1.8.0b2

Type:   array


[ Top ]

$directories =

[line 164]


Type:   array


[ Top ]

$dispatcher =

[line 124]

Stores the event dispatcher which handles notifications
  • Since: 1.8.0b2
  • Access: protected

Type:   object


[ Top ]

$earliest_version =  ''

[line 146]

  • Var: Last version of PHP to use

Type:   string


[ Top ]

$ignored_files = array()

[line 171]


Type:   array


[ Top ]

$latest_parse =  null

[line 178]


Type:   array


[ Top ]

$latest_version =  '4.0.0'

[line 141]

  • Var: Earliest version of PHP to use
  • Since: 0.7.0

Type:   string


[ Top ]

$options =

[line 151]

  • Var: Parsing options

Type:   array


[ Top ]

$renderer =

[line 115]

Instance of concrete renderer used to show parse results
  • Since: 1.8.0b2
  • Access: protected

Type:   object


[ Top ]



Method Detail

__construct (Constructor)   [line 197]

PHP_CompatInfo_Parser __construct( )

Class constructor (ZE2) for PHP5+
  • Since: version 1.8.0b2 (2008-06-03)
  • Access: public

[ Top ]

PHP_CompatInfo_Parser (Constructor)   [line 186]

PHP_CompatInfo_Parser PHP_CompatInfo_Parser( )

Class constructor (ZE1) for PHP4
  • Since: version 1.8.0b2 (2008-06-03)
  • Access: public

[ Top ]

addListener   [line 238]

void addListener( mixed $callback, [string $nName = EVENT_DISPATCHER_GLOBAL])

Registers a new listener

Registers a new listener with the given criteria.

  • Since: version 1.8.0b2 (2008-06-03)
  • Access: public

Parameters:

mixed   $callback   —  A PHP callback
string   $nName   —  (optional) Expected notification name

[ Top ]

getClasses   [line 621]

mixed getClasses( [mixed $file = false])

Returns the latest parse data source classes declared

Returns the latest parse data source classes declared (internal or end-user defined)

  • Return: Null on error or if there were no previous data parsing
  • Since: version 1.9.0b1 (2008-11-30)
  • Access: public

Parameters:

mixed   $file   —  (optional) A specific filename or not (false)

[ Top ]

getConditions   [line 759]

mixed getConditions( [mixed $file = false], [bool $levelOnly = false])

Returns the latest parse data source conditions

Returns the latest parse data source conditions, with or without contextual data

  • Return: Null on error or if there were no previous data parsing
  • Since: version 1.9.0b1 (2008-11-30)
  • Access: public

Parameters:

mixed   $file   —  (optional) A specific filename or not (false)
bool   $levelOnly   —  (optional) Level with or without contextual data

[ Top ]

getConstants   [line 704]

mixed getConstants( [mixed $file = false])

Returns the latest parse data source constants declared

Returns the latest parse data source constants declared (internal or end-user defined)

  • Return: Null on error or if there were no previous data parsing
  • Since: version 1.9.0b1 (2008-11-30)
  • Access: public

Parameters:

mixed   $file   —  (optional) A specific filename or not (false)

[ Top ]

getDirlist   [line 389]

array getDirlist( mixed $dir, array $options)

Returns list of directory parsed

Returns list of directory parsed, depending of restrictive parser options.

  • Return: list of directories that should be parsed
  • Since: version 1.8.0b2 (2008-06-03)
  • Access: public

Parameters:

mixed   $dir   —  The directory name
array   $options   —  An array of parser options. See parseData() method.

[ Top ]

getExtensions   [line 676]

mixed getExtensions( [mixed $file = false])

Returns the latest parse data source extensions used

Returns the latest parse data source extensions used

  • Return: Null on error or if there were no previous data parsing
  • Since: version 1.9.0b1 (2008-11-30)
  • Access: public

Parameters:

mixed   $file   —  (optional) A specific filename or not (false)

[ Top ]

getFilelist   [line 410]

array getFilelist( mixed $dir, array $options)

Returns list of files parsed

Returns list of files parsed, depending of restrictive parser options.

  • Return: list of files that should be parsed
  • Since: version 1.8.0b2 (2008-06-03)
  • Access: public

Parameters:

mixed   $dir   —  The directory name where to look files
array   $options   —  An array of parser options. See parseData() method.

[ Top ]

getFunctions   [line 649]

mixed getFunctions( [mixed $file = false])

Returns the latest parse data source functions declared

Returns the latest parse data source functions declared (internal or end-user defined)

  • Return: Null on error or if there were no previous data parsing
  • Since: version 1.9.0b1 (2008-11-30)
  • Access: public

Parameters:

mixed   $file   —  (optional) A specific filename or not (false)

[ Top ]

getIgnoredConstants   [line 563]

mixed getIgnoredConstants( [mixed $file = false])

Returns the latest parse data source ignored constants

Returns the latest parse data source ignored constants list

  • Return: Null on error or if there were no previous data parsing
  • Since: version 1.9.0b2 (2008-12-19)
  • Access: public

Parameters:

mixed   $file   —  (optional) A specific filename or not (false)

[ Top ]

getIgnoredExtensions   [line 536]

mixed getIgnoredExtensions( [mixed $file = false])

Returns the latest parse data source ignored extensions

Returns the latest parse data source ignored extensions list

  • Return: Null on error or if there were no previous data parsing
  • Since: version 1.9.0b2 (2008-12-19)
  • Access: public

Parameters:

mixed   $file   —  (optional) A specific filename or not (false)

[ Top ]

getIgnoredFiles   [line 493]

array getIgnoredFiles( )

Returns list of files ignored

Returns list of files ignored while parsing directories

  • Return: or false on error
  • Since: version 1.8.0b2 (2008-06-03)
  • Access: public

[ Top ]

getIgnoredFunctions   [line 509]

mixed getIgnoredFunctions( [mixed $file = false])

Returns the latest parse data source ignored functions

Returns the latest parse data source ignored functions list

  • Return: Null on error or if there were no previous data parsing
  • Since: version 1.9.0b2 (2008-12-19)
  • Access: public

Parameters:

mixed   $file   —  (optional) A specific filename or not (false)

[ Top ]

getTokens   [line 731]

mixed getTokens( [mixed $file = false])

Returns the latest parse data source tokens declared

Returns the latest parse data source PHP5+ tokens declared

  • Return: Null on error or if there were no previous data parsing
  • Since: version 1.9.0b1 (2008-11-30)
  • Access: public

Parameters:

mixed   $file   —  (optional) A specific filename or not (false)

[ Top ]

getVersion   [line 591]

mixed getVersion( [mixed $file = false], [bool $max = false])

Returns the latest parse data source version

Returns the latest parse data source version, minimum and/or maximum

  • Return: Null on error or if there were no previous data parsing
  • Since: version 1.9.0b1 (2008-11-30)
  • Access: public

Parameters:

mixed   $file   —  (optional) A specific filename or not (false)
bool   $max   —  (optional) Level with or without contextual data

[ Top ]

loadVersion   [line 308]

array loadVersion( string $min, [string|boolean $max = false], [boolean $include_const = false], [boolean $groupby_vers = false])

Load components list

Load components list for a PHP version or subset

  • Return: An array of php function/constant names history
  • Since: version 1.2.0 (2006-08-23)
  • Access: public

Parameters:

string   $min   —  PHP minimal version
string|boolean   $max   —  (optional) PHP maximal version
boolean   $include_const   —  (optional) include constants list in final result
boolean   $groupby_vers   —  (optional) give initial php version of function or constant

[ Top ]

notifyListeners   [line 284]

void notifyListeners( string $event, [array $info = array()])

Post a new notification to all listeners registered.

This notification occured only if a dispatcher exists. That means if at least one listener was registered.

  • Since: version 1.8.0b2 (2008-06-03)
  • Access: public

Parameters:

string   $event   —  Name of the notification handler
array   $info   —  (optional) Additional information about the notification

[ Top ]

parseData   [line 827]

array parseData( mixed $dataSource, [array $options = array()])

Parse a data source

Parse a data source with auto detect ability. This data source, may be one of these follows: a directory, a file, a string (chunk of code), an array of multiple origin.

Each of five parsing functions support common and specifics options.

* Common options :

  • '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.
  • 'ignore_constants' Contains an array of constants to ignore when calculating the version needed.
  • 'ignore_extensions' Contains an array of php extensions to ignore when calculating the version needed.
  • 'ignore_versions' Contains an array of php versions to ignore when calculating the version needed.
  • 'ignore_functions_match' Contains an array of function patterns to ignore when calculating the version needed.
  • 'ignore_extensions_match' Contains an array of extension patterns to ignore when calculating the version needed.
  • 'ignore_constants_match' Contains an array of constant patterns to ignore when calculating the version needed.
* parseArray, parseDir|parseFolder, specific options :
  • 'file_ext' Contains an array of file extensions to parse for PHP code. Default: php, php4, inc, phtml
  • 'ignore_files' Contains an array of files to ignore. File names are case insensitive.
* parseArray specific options :
  • 'is_string' Contains a boolean which says if the array values are strings or file names.
* parseDir|parseFolder specific options :
  • 'recurse_dir' Boolean on whether to recursively find files
  • 'ignore_dirs' Contains an array of directories to ignore. Directory names are case insensitive.

  • Return: or false on error
  • Since: version 1.8.0b2 (2008-06-03)
  • Access: public

Parameters:

mixed   $dataSource   —  The data source (may be file, dir, string, or array)
array   $options   —  An array of options. See above.

[ Top ]

removeListener   [line 258]

bool removeListener( mixed $callback, [string $nName = EVENT_DISPATCHER_GLOBAL])

Removes a registered listener

Removes a registered listener that correspond to the given criteria.

  • Return: True if listener was removed, false otherwise.
  • Since: version 1.8.0b2 (2008-06-03)
  • Access: public

Parameters:

mixed   $callback   —  A PHP callback
string   $nName   —  (optional) Expected notification name

[ Top ]

setOutputDriver   [line 221]

void setOutputDriver( string $type, [array $conf = array()])

Set up driver to be used

Set up driver to be used, dependant on specified type.

  • Since: version 1.8.0b2 (2008-06-03)
  • Access: public

Parameters:

string   $type   —  Name the type of driver (html, text...)
array   $conf   —  A hash containing any additional configuration

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:28:47 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.