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

Source for file exceptions.conf.php

Documentation is available at exceptions.conf.php

  1. <?php
  2. /**
  3.  * Exceptions definition for Classes and Constants official version known
  4.  *
  5.  * PHP versions 5
  6.  *
  7.  * @category PHP
  8.  * @package  PHP_CompatInfo
  9.  * @author   Laurent Laville <pear@laurent-laville.org>
  10.  * @license  http://www.opensource.org/licenses/bsd-license.php  BSD
  11.  * @version  CVS: $Id: exceptions.conf.php,v 1.1 2008/11/29 18:17:55 farell Exp $
  12.  * @link     http://pear.php.net/package/PHP_CompatInfo
  13.  * @since    File available since Release 1.9.0b1
  14.  */
  15.  
  16. /* default version for each extension
  17.    if not defined, then suppose its 5.0.0 */
  18. $version_exceptions = array('standard' => '4.0.0');
  19. /* if default version is not 4.0.0, then we can fix the right
  20.    constant initial version here */
  21. require_once 'constant_exceptions.php';
  22. /* if default version is not 4.0.0, then we can fix the right
  23.    predefined class initial version here */
  24. require_once 'class_exceptions.php';
  25.  
  26. /**
  27.  * Function that provides to return exceptions results
  28.  *
  29.  * @param string $extension Extension name
  30.  * @param sting  $type      Type of exception (version | class | constant)
  31.  *
  32.  * @return mixed Return false if no exception exists for this $extension and $type
  33.  */
  34. function getExceptions($extension$type)
  35. {
  36.     global $version_exceptions$class_exceptions$constant_exceptions;
  37.  
  38.     $exceptions = false;
  39.  
  40.     switch ($type{
  41.     case 'version' :
  42.         if (isset($version_exceptions[$extension])) {
  43.             $exceptions $version_exceptions[$extension];
  44.         }
  45.         break;
  46.     case 'class' :
  47.         if (isset($class_exceptions[$extension])) {
  48.             $exceptions $class_exceptions[$extension];
  49.         }
  50.         break;
  51.     case 'constant' :
  52.         if (isset($constant_exceptions[$extension])) {
  53.             $exceptions $constant_exceptions[$extension];
  54.         }
  55.     }
  56.  
  57.     return $exceptions;
  58. }
  59. ?>

Documentation generated on Sun, 30 Nov 2008 16:30:27 -0500 by phpDocumentor 1.4.0. PEAR Logo Copyright © PHP Group 2004.