cvs: pear /Reflection_Annotation package.xml /Reflection_Annotation/Reflection Annotation.php /Reflection_Annotation/Reflection/Annotation
AnnotatedElement.php Class.php Function.php Method.php Parser.php Property.php /Reflection_Annotation/Tests AllTests.php

From: Date: Mon, 23 May 2005 08:27:16 +0000
Subject: cvs: pear /Reflection_Annotation package.xml /Reflection_Annotation/Reflection Annotation.php /Reflection_Annotation/Reflection/Annotation
AnnotatedElement.php Class.php Function.php Method.php Parser.php Property.php /Reflection_Annotation/Tests AllTests.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-32047@lists.php.net to get a copy of this message
sebastian Mon May 23 04:27:16 2005 EDT Added files: /pear/Reflection_Annotation package.xml /pear/Reflection_Annotation/Reflection Annotation.php /pear/Reflection_Annotation/Reflection/Annotation AnnotatedElement.php Class.php Function.php Method.php Parser.php Property.php /pear/Reflection_Annotation/Tests AllTests.php Log: Initial import after proposal #237 has been accepted.

http://cvs.php.net/co.php/pear/Reflection_Annotation/package.xml?r=1.1&p=1 Index: pear/Reflection_Annotation/package.xml +++ pear/Reflection_Annotation/package.xml <?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE package SYSTEM "http://pear.php.net/dtd/package-1.0"> <package version="1.0"> <name>Reflection_Annotation</name> <summary>Extension to the PHP 5 Reflection API that supports Annotations.</summary> <description>Extension to the PHP 5 Reflection API that supports Annotations.</description> <maintainers> <maintainer> <user>sebastian</user> <name>Sebastian Bergmann</name> <email>sb@sebastian-bergmann.de</email> </maintainer> </maintainers> <license>PHP License</license> <release> <version>1.0.0dev</version> <state>devel</state> <date>2005-MM-DD</date> <notes> <![CDATA[ ]]> </notes> <filelist> <dir name="/"> <dir name="Reflection"> <dir name="Annotation"> <file role="php" name="AnnotatedElement.php"> <replace type="package-info" from="@package_version@" to="version"/> </file> <file role="php" name="Class.php"> <replace type="package-info" from="@package_version@" to="version"/> </file> <file role="php" name="Function.php"> <replace type="package-info" from="@package_version@" to="version"/> </file> <file role="php" name="Method.php"> <replace type="package-info" from="@package_version@" to="version"/> </file> <file role="php" name="Parser.php"> <replace type="package-info" from="@package_version@" to="version"/> </file> <file role="php" name="Property.php"> <replace type="package-info" from="@package_version@" to="version"/> </file> </dir> <file role="php" name="Annotation.php"> <replace type="package-info" from="@package_version@" to="version"/> </file> </dir> <dir name="Tests" role="test"> <file name="AllTests.php"> <replace type="package-info" from="@package_version@" to="version"/> </file> </dir> </dir> </filelist> <deps> <dep type="php" rel="ge" version="5.1.0" /> </deps> </release> </package> http://cvs.php.net/co.php/pear/Reflection_Annotation/Reflection/Annotation.php?r=1.1&p=1 Index: pear/Reflection_Annotation/Reflection/Annotation.php +++ pear/Reflection_Annotation/Reflection/Annotation.php <?php /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ /** * PHP Version 5 * * LICENSE: This source file is subject to version 3.0 of the PHP license * that is available through the world-wide-web at the following URI: * http://www.php.net/license/3_0.txt. If you did not receive a copy of * the PHP License and are unable to obtain it through the web, please * send a note to license@php.net so we can mail you a copy immediately. * * @category PHP * @package Reflection_Annotation * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version CVS: $Id: Annotation.php,v 1.1 2005/05/23 08:27:16 sebastian Exp $ * @link http://pear.php.net/package/Reflection_Annotation * @since File available since Release 1.0.0 */ /** * Abstract base class for Annotations. * * @category PHP * @package Reflection_Annotation * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version Release: @package_version@ * @link http://pear.php.net/package/Reflection_Annotation * @since Class available since Release 1.0.0 */ abstract class Reflection_Annotation { private $reflector; private $arguments; /** * Constructor. * * @param Reflector $reflector * @param Array $arguments * @throws InvalidArgumentException * @access protected */ protected function __construct($reflector, $arguments) { if (!($reflector instanceof ReflectionClass || $reflector instanceof ReflectionFunction || $reflector instanceof ReflectionMethod || $reflector instanceof ReflectionProperty)) { throw new InvalidArgumentException; } $this->reflector = $reflector; $this->arguments = $arguments; // XXX: TODO: Implement parameter mapping. } /** * Factory for concrete implementations of Reflection_Annotation. * * @param Object $reflector * @param String $name * @param Array $arguments * @return Reflection_Annotation * @throws ReflectionException * @access public * @static * @final */ public static final function factory($reflector, $name, $arguments) { $class = new ReflectionClass($name . 'Annotation'); if ($class->isSubclassOf('Reflection_Annotation') && $class->isInstantiable()) { return $class->newInstance( $reflector, $arguments ); } } /** * Returns the reflector this annotation is associated with. * * @return Reflector * @access public */ public final function getReflector() { return $this->reflector; } } /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * c-hanging-comment-ender-p: nil * End: */ ?> http://cvs.php.net/co.php/pear/Reflection_Annotation/Reflection/Annotation/AnnotatedElement.php?r=1.1&p=1 Index: pear/Reflection_Annotation/Reflection/Annotation/AnnotatedElement.php +++ pear/Reflection_Annotation/Reflection/Annotation/AnnotatedElement.php <?php /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ /** * PHP Version 5 * * LICENSE: This source file is subject to version 3.0 of the PHP license * that is available through the world-wide-web at the following URI: * http://www.php.net/license/3_0.txt. If you did not receive a copy of * the PHP License and are unable to obtain it through the web, please * send a note to license@php.net so we can mail you a copy immediately. * * @category PHP * @package Reflection_Annotation * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version CVS: $Id: AnnotatedElement.php,v 1.1 2005/05/23 08:27:16 sebastian Exp $ * @link http://pear.php.net/package/Reflection_Annotation * @since File available since Release 1.0.0 */ /** * Represents an annotated element of the program currently running. * * @category PHP * @package Reflection_Annotation * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version Release: @package_version@ * @link http://pear.php.net/package/Reflection_Annotation * @since Interface available since Release 1.0.0 */ interface Reflection_Annotation_AnnotatedElement { /** * Returns the annotations. * * @return Reflection_Annotation[] * @access public */ public function getAnnotations(); /** * Returns annotation by name. * * @param String $name * @return Reflection_Annotation * @access public */ public function getAnnotation($name); /** * Returns wether an annotation exists or not. * * @param String $name * @return boolean * @access public */ public function hasAnnotation($name); } /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * c-hanging-comment-ender-p: nil * End: */ ?> http://cvs.php.net/co.php/pear/Reflection_Annotation/Reflection/Annotation/Class.php?r=1.1&p=1 Index: pear/Reflection_Annotation/Reflection/Annotation/Class.php +++ pear/Reflection_Annotation/Reflection/Annotation/Class.php <?php /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ /** * PHP Version 5 * * LICENSE: This source file is subject to version 3.0 of the PHP license * that is available through the world-wide-web at the following URI: * http://www.php.net/license/3_0.txt. If you did not receive a copy of * the PHP License and are unable to obtain it through the web, please * send a note to license@php.net so we can mail you a copy immediately. * * @category PHP * @package Reflection_Annotation * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version CVS: $Id: Class.php,v 1.1 2005/05/23 08:27:16 sebastian Exp $ * @link http://pear.php.net/package/Reflection_Annotation * @since File available since Release 1.0.0 */ require_once 'Reflection/Annotation/AnnotatedElement.php'; require_once 'Reflection/Annotation/Method.php'; require_once 'Reflection/Annotation/Parser.php'; require_once 'Reflection/Annotation/Property.php'; require_once 'Reflection/Annotation.php'; /** * Extension to ReflectionClass that is aware of Annotations. * * @category PHP * @package Reflection_Annotation * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version Release: @package_version@ * @link http://pear.php.net/package/Reflection_Annotation * @since Class available since Release 1.0.0 */ class Reflection_Annotation_Class extends ReflectionClass implements Reflection_Annotation_AnnotatedElement { private $annotations; /** * Constructor. * * @param mixed $class * @throws InvalidArgumentException * @access public */ public function __construct($class) { if (is_string($class)) { parent::__construct($class); } else if ($class instanceof ReflectionClass) { parent::__construct($class->getName()); } else { throw new InvalidArgumentException; } $this->annotations = Reflection_Annotation_Parser::parseAnnotations($this->getDocComment()); } /** * Returns the class' annotations. * * @return Reflection_Annotation[] * @access public */ public function getAnnotations() { $annotations = array(); foreach ($this->annotations as $name => $arguments) { $annotations[] = Reflection_Annotation::factory( $this, $name, $arguments ); } return $annotations; } /** * Returns the class' annotation specified by its name. * * @param String $name * @return Reflection_Annotation * @throws ReflectionException * @access public */ public function getAnnotation($name) { if (isset($this->annotations[$name])) { return Reflection_Annotation::factory( $this, $name, $this->annotations[$name] ); } else { throw new ReflectionException( sprintf( 'Class "%s" does not have annotation "%s"', $this->getName(), $name ) ); } } /** * Returns wether an annotation exists or not. * * @param String $name * @return boolean * @access public */ public function hasAnnotation($name) { return isset($this->annotations[$name]); } /** * Returns an array of this class' methods. * * @return Reflection_Annotation_Method[] * @access public */ public function getMethods() { $methods = array(); foreach (parent::getMethods() as $method) { $methods[] = new Reflection_Annotation_Method($this->getName(), $method->getName()); } return $methods; } /** * Returns the class' method specified by its name. * * @param string $name * @return Reflection_Annotation_Method * @access public */ public function getMethod($name) { return new Reflection_Annotation_Method($this->getName(), $name); } /** * Returns an array of this class' properties. * * @return Reflection_Annotation_Property[] * @access public */ public function getProperties() { $properties = array(); foreach (parent::getProperties() as $property) { $properties[] = new Reflection_Annotation_Property($this->getName(), $property->getName()); } return $properties; } /** * Returns the class' property specified by its name. * * @param string $name * @return Reflection_Annotation_Property * @access public */ public function getProperty($name) { return new Reflection_Annotation_Property($this->getName(), $name); } } /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * c-hanging-comment-ender-p: nil * End: */ ?> http://cvs.php.net/co.php/pear/Reflection_Annotation/Reflection/Annotation/Function.php?r=1.1&p=1 Index: pear/Reflection_Annotation/Reflection/Annotation/Function.php +++ pear/Reflection_Annotation/Reflection/Annotation/Function.php <?php /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ /** * PHP Version 5 * * LICENSE: This source file is subject to version 3.0 of the PHP license * that is available through the world-wide-web at the following URI: * http://www.php.net/license/3_0.txt. If you did not receive a copy of * the PHP License and are unable to obtain it through the web, please * send a note to license@php.net so we can mail you a copy immediately. * * @category PHP * @package Reflection_Annotation * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version CVS: $Id: Function.php,v 1.1 2005/05/23 08:27:16 sebastian Exp $ * @link http://pear.php.net/package/Reflection_Annotation * @since File available since Release 1.0.0 */ require_once 'Reflection/Annotation/AnnotatedElement.php'; require_once 'Reflection/Annotation/Parser.php'; require_once 'Reflection/Annotation.php'; /** * Extension to ReflectionFunction that is aware of Annotations. * * @category PHP * @package Reflection_Annotation * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version Release: @package_version@ * @link http://pear.php.net/package/Reflection_Annotation * @since Class available since Release 1.0.0 */ class Reflection_Annotation_Function extends ReflectionFunction implements Reflection_Annotation_AnnotatedElement { private $annotations; /** * Constructor. * * @param mixed $class * @throws InvalidArgumentException * @access public */ public function __construct($function) { if (is_string($function)) { parent::__construct($function); } else if ($function instanceof ReflectionFunction) { parent::__construct($function->getName()); } else { throw new InvalidArgumentException; } $this->annotations = Reflection_Annotation_Parser::parseAnnotations($this->getDocComment()); } /** * Returns the function's annotations. * * @return Reflection_Annotation[] * @access public */ public function getAnnotations() { $annotations = array(); foreach ($this->annotations as $name => $arguments) { $annotations[] = Reflection_Annotation::factory( $this, $name, $arguments ); } return $annotations; } /** * Returns the function's annotation specified by its name. * * @param String $name * @return Reflection_Annotation * @throws ReflectionException * @access public */ public function getAnnotation($name) { if (isset($this->annotations[$name])) { return Reflection_Annotation::factory( $this, $name, $this->annotations[$name] ); } else { throw new ReflectionException( sprintf( 'Function "%s" does not have annotation "%s"', $this->getName(), $name ) ); } } /** * Returns wether an annotation exists or not. * * @param String $name * @return boolean * @access public */ public function hasAnnotation($name) { return isset($this->annotations[$name]); } } /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * c-hanging-comment-ender-p: nil * End: */ ?> http://cvs.php.net/co.php/pear/Reflection_Annotation/Reflection/Annotation/Method.php?r=1.1&p=1 Index: pear/Reflection_Annotation/Reflection/Annotation/Method.php +++ pear/Reflection_Annotation/Reflection/Annotation/Method.php <?php /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ /** * PHP Version 5 * * LICENSE: This source file is subject to version 3.0 of the PHP license * that is available through the world-wide-web at the following URI: * http://www.php.net/license/3_0.txt. If you did not receive a copy of * the PHP License and are unable to obtain it through the web, please * send a note to license@php.net so we can mail you a copy immediately. * * @category PHP * @package Reflection_Annotation * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version CVS: $Id: Method.php,v 1.1 2005/05/23 08:27:16 sebastian Exp $ * @link http://pear.php.net/package/Reflection_Annotation * @since File available since Release 1.0.0 */ require_once 'Reflection/Annotation/AnnotatedElement.php'; require_once 'Reflection/Annotation/Parser.php'; require_once 'Reflection/Annotation.php'; /** * Extension to ReflectionMethod that is aware of Annotations. * * @category PHP * @package Reflection_Annotation * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version Release: @package_version@ * @link http://pear.php.net/package/Reflection_Annotation * @since Class available since Release 1.0.0 */ class Reflection_Annotation_Method extends ReflectionMethod implements Reflection_Annotation_AnnotatedElement { private $annotations; /** * Constructor. * * @param * @param * @throws InvalidArgumentException * @access public */ public function __construct($class, $name = '') { if (is_string($class)) { parent::__construct($class, $name); } else if ($class instanceof ReflectionMethod) { parent::__construct($class->getDeclaringClass()->getName(), $class->getName()); } else { throw new InvalidArgumentException; } $this->annotations = Reflection_Annotation_Parser::parseAnnotations($this->getDocComment()); } /** * Returns the method's annotations. * * @return Reflection_Annotation[] * @access public */ public function getAnnotations() { $annotations = array(); foreach ($this->annotations as $name => $arguments) { $annotations[] = Reflection_Annotation::factory( $this, $name, $arguments ); } return $annotations; } /** * Returns the method's annotation specified by its name. * * @param String $name * @return Reflection_Annotation * @throws ReflectionException * @access public */ public function getAnnotation($name) { if (isset($this->annotations[$name])) { return Reflection_Annotation::factory( $this, $name, $this->annotations[$name] ); } else { throw new ReflectionException( sprintf( 'Method "%s" does not have annotation "%s"', $this->getName(), $name ) ); } } /** * Returns wether an annotation exists or not. * * @param String $name * @return boolean * @access public */ public function hasAnnotation($name) { return isset($this->annotations[$name]); } } /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * c-hanging-comment-ender-p: nil * End: */ ?> http://cvs.php.net/co.php/pear/Reflection_Annotation/Reflection/Annotation/Parser.php?r=1.1&p=1 Index: pear/Reflection_Annotation/Reflection/Annotation/Parser.php +++ pear/Reflection_Annotation/Reflection/Annotation/Parser.php <?php /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ /** * PHP Version 5 * * LICENSE: This source file is subject to version 3.0 of the PHP license * that is available through the world-wide-web at the following URI: * http://www.php.net/license/3_0.txt. If you did not receive a copy of * the PHP License and are unable to obtain it through the web, please * send a note to license@php.net so we can mail you a copy immediately. * * @category PHP * @package Reflection_Annotation * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version CVS: $Id: Parser.php,v 1.1 2005/05/23 08:27:16 sebastian Exp $ * @link http://pear.php.net/package/Reflection_Annotation * @since File available since Release 1.0.0 */ /** * Parser for Annotations. * * @category PHP * @package Reflection_Annotation * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version Release: @package_version@ * @link http://pear.php.net/package/Reflection_Annotation * @since Class available since Release 1.0.0 */ class Reflection_Annotation_Parser { /** * Parser for Annotations. * * @param string $docComment * @return array * @access public */ public static function parseAnnotations($docComment) { $annotations = array(); $lines = explode("\n", $docComment); foreach ($lines as $line) { $nameStart = strpos($line, '@'); if ($nameStart !== FALSE) { $nameEnd = strpos($line, '(', $nameStart); if ($nameEnd !== FALSE) { $name = substr($line, $nameStart + 1, $nameEnd - $nameStart - 1); } $argumentsEnd = strpos($line, ')', $nameEnd); if ($argumentsEnd !== FALSE) { $arguments = substr($line, $nameEnd + 1, $argumentsEnd - ($nameEnd + 1)); $annotations[$name] = $arguments; } } } return $annotations; } } /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * c-hanging-comment-ender-p: nil * End: */ ?> http://cvs.php.net/co.php/pear/Reflection_Annotation/Reflection/Annotation/Property.php?r=1.1&p=1 Index: pear/Reflection_Annotation/Reflection/Annotation/Property.php +++ pear/Reflection_Annotation/Reflection/Annotation/Property.php <?php /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ /** * PHP Version 5 * * LICENSE: This source file is subject to version 3.0 of the PHP license * that is available through the world-wide-web at the following URI: * http://www.php.net/license/3_0.txt. If you did not receive a copy of * the PHP License and are unable to obtain it through the web, please * send a note to license@php.net so we can mail you a copy immediately. * * @category PHP * @package Reflection_Annotation * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version CVS: $Id: Property.php,v 1.1 2005/05/23 08:27:16 sebastian Exp $ * @link http://pear.php.net/package/Reflection_Annotation * @since File available since Release 1.0.0 */ require_once 'Reflection/Annotation/AnnotatedElement.php'; require_once 'Reflection/Annotation/Parser.php'; require_once 'Reflection/Annotation.php'; /** * Extension to ReflectionProperty that is aware of Annotations. * * @category PHP * @package Reflection_Annotation * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version Release: @package_version@ * @link http://pear.php.net/package/Reflection_Annotation * @since Class available since Release 1.0.0 */ class Reflection_Annotation_Property extends ReflectionProperty implements Reflection_Annotation_AnnotatedElement { private $annotations; /** * Constructor. * * @param * @param * @throws InvalidArgumentException * @access public */ public function __construct($class, $name = '') { if (is_string($class)) { parent::__construct($class, $name); } else if ($class instanceof ReflectionProperty) { parent::__construct($class->getDeclaringClass()->getName(), $class->getName()); } else { throw new InvalidArgumentException; } $this->annotations = Reflection_Annotation_Parser::parseAnnotations($this->getDocComment()); } /** * Returns the property's annotations. * * @return Reflection_Annotation[] * @access public */ public function getAnnotations() { $annotations = array(); foreach ($this->annotations as $name => $arguments) { $annotations[] = Reflection_Annotation::factory( $this, $name, $arguments ); } return $annotations; } /** * Returns the property's annotation specified by its name. * * @param String $name * @return Reflection_Annotation * @throws ReflectionException * @access public */ public function getAnnotation($name) { if (isset($this->annotations[$name])) { return Reflection_Annotation::factory( $this, $name, $this->annotations[$name] ); } else { throw new ReflectionException( sprintf( 'Property "%s" does not have annotation "%s"', $this->getName(), $name ) ); } } /** * Returns wether an annotation exists or not. * * @param String $name * @return boolean * @access public */ public function hasAnnotation($name) { return isset($this->annotations[$name]); } } /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * c-hanging-comment-ender-p: nil * End: */ ?> http://cvs.php.net/co.php/pear/Reflection_Annotation/Tests/AllTests.php?r=1.1&p=1 Index: pear/Reflection_Annotation/Tests/AllTests.php +++ pear/Reflection_Annotation/Tests/AllTests.php <?php /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ /** * PHP Version 5 * * LICENSE: This source file is subject to version 3.0 of the PHP license * that is available through the world-wide-web at the following URI: * http://www.php.net/license/3_0.txt. If you did not receive a copy of * the PHP License and are unable to obtain it through the web, please * send a note to license@php.net so we can mail you a copy immediately. * * @category PHP * @package Reflection_Annotation * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version CVS: $Id: AllTests.php,v 1.1 2005/05/23 08:27:16 sebastian Exp $ * @link http://pear.php.net/package/Reflection_Annotation * @since File available since Release 1.0.0 */ if (!defined('PHPUnit2_MAIN_METHOD')) { define('PHPUnit2_MAIN_METHOD', 'AllTests::main'); } require_once 'PHPUnit2/Framework/TestSuite.php'; require_once 'PHPUnit2/TextUI/TestRunner.php'; /** * * * @category PHP * @package Reflection_Annotation * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version Release: @package_version@ * @link http://pear.php.net/package/Reflection_Annotation * @since Class available since Release 1.0.0 */ class AllTests { public static function main() { PHPUnit2_TextUI_TestRunner::run(self::suite()); } public static function suite() { $suite = new PHPUnit2_Framework_TestSuite('Reflection_Annotation'); return $suite; } } if (PHPUnit2_MAIN_METHOD == 'AllTests::main') { AllTests::main(); } /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * c-hanging-comment-ender-p: nil * End: */ ?>
« previous php.pear.cvs (#32047) next »