/PHP/CompatInfo/Reference/simplexml.php
PHP | 205 lines | 111 code | 13 blank | 81 comment | 32 complexity | f579fe8648d9b19a5e5b64dc8f22c3fe MD5 | raw file
Possible License(s): BSD-3-Clause
- <?php
- /**
- * Version informations about SimpleXML extension
- *
- * PHP version 5
- *
- * @category PHP
- * @package PHP_CompatInfo
- * @author Laurent Laville <pear@laurent-laville.org>
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
- * @version SVN: $Id$
- * @link http://php5.laurent-laville.org/compatinfo/
- */
- /**
- * All interfaces, classes, functions, constants about SimpleXML extension
- *
- * @category PHP
- * @package PHP_CompatInfo
- * @author Laurent Laville <pear@laurent-laville.org>
- * @license http://www.opensource.org/licenses/bsd-license.php BSD License
- * @version Release: @package_version@
- * @link http://php5.laurent-laville.org/compatinfo/
- * @link http://www.php.net/manual/en/book.simplexml.php
- */
- class PHP_CompatInfo_Reference_SimpleXML implements PHP_CompatInfo_Reference
- {
- /**
- * Gets all informations at once about:
- * extensions, interfaces, classes, functions, constants
- *
- * @param string $extension OPTIONAL
- * @param string $version OPTIONAL PHP version
- * (4 => only PHP4, 5 or null => PHP4 + PHP5)
- *
- * @return array
- */
- public function getAll($extension = null, $version = null)
- {
- $references = array(
- 'extensions' => $this->getExtensions($extension, $version),
- 'interfaces' => $this->getInterfaces($extension, $version),
- 'classes' => $this->getClasses($extension, $version),
- 'functions' => $this->getFunctions($extension, $version),
- 'constants' => $this->getConstants($extension, $version),
- );
- return $references;
- }
- /**
- * Gets informations about extensions
- *
- * @param string $extension OPTIONAL
- * @param string $version OPTIONAL PHP version
- * (4 => only PHP4, 5 or null => PHP4 + PHP5)
- *
- * @return array
- */
- public function getExtensions($extension = null, $version = null)
- {
- $extensions = array(
- 'SimpleXML' => array('5.0.0', '', '0.1')
- );
- return $extensions;
- }
- /**
- * Gets informations about interfaces
- *
- * @param string $extension OPTIONAL
- * @param string $version OPTIONAL PHP version
- * (4 => only PHP4, 5 or null => PHP4 + PHP5)
- *
- * @return array
- */
- public function getInterfaces($extension = null, $version = null)
- {
- $interfaces = array();
- if ((null == $version ) || ('4' == $version)) {
- $version4 = array(
- );
- $interfaces = array_merge(
- $interfaces,
- $version4
- );
- }
- if ((null == $version ) || ('5' == $version)) {
- $version5 = array(
- );
- $interfaces = array_merge(
- $interfaces,
- $version5
- );
- }
- return $interfaces;
- }
- /**
- * Gets informations about classes
- *
- * @param string $extension OPTIONAL
- * @param string $version OPTIONAL PHP version
- * (4 => only PHP4, 5 or null => PHP4 + PHP5)
- *
- * @return array
- * @link http://www.php.net/manual/en/class.simplexmlelement.php
- * @link http://www.php.net/manual/en/class.simplexmliterator.php
- */
- public function getClasses($extension = null, $version = null)
- {
- $classes = array();
- if ((null == $version ) || ('4' == $version)) {
- $version4 = array(
- );
- $classes = array_merge(
- $classes,
- $version4
- );
- }
- if ((null == $version ) || ('5' == $version)) {
- $version5 = array(
- 'SimpleXMLElement' => array('5.0.1', ''),
- 'SimpleXMLIterator' => array('5.1.0', ''),
- );
- $classes = array_merge(
- $classes,
- $version5
- );
- }
- return $classes;
- }
- /**
- * Gets informations about functions
- *
- * @param string $extension OPTIONAL
- * @param string $version OPTIONAL PHP version
- * (4 => only PHP4, 5 or null => PHP4 + PHP5)
- *
- * @return array
- * @link http://www.php.net/manual/en/ref.simplexml.php
- */
- public function getFunctions($extension = null, $version = null)
- {
- $functions = array();
- if ((null == $version ) || ('4' == $version)) {
- $version4 = array(
- );
- $functions = array_merge(
- $functions,
- $version4
- );
- }
- if ((null == $version ) || ('5' == $version)) {
- $version5 = array(
- 'simplexml_import_dom' => array('5.0.0', ''),
- 'simplexml_load_file' => array('5.0.0', ''),
- 'simplexml_load_string' => array('5.0.0', ''),
- );
- $functions = array_merge(
- $functions,
- $version5
- );
- }
- return $functions;
- }
- /**
- * Gets informations about constants
- *
- * @param string $extension OPTIONAL
- * @param string $version OPTIONAL PHP version
- * (4 => only PHP4, 5 or null => PHP4 + PHP5)
- *
- * @return array
- */
- public function getConstants($extension = null, $version = null)
- {
- $constants = array();
- if ((null == $version ) || ('4' == $version)) {
- $version4 = array(
- );
- $constants = array_merge(
- $constants,
- $version4
- );
- }
- if ((null == $version ) || ('5' == $version)) {
- $version5 = array(
- );
- $constants = array_merge(
- $constants,
- $version5
- );
- }
- return $constants;
- }
- }