[ZF-10089] Zend_Log
[zend/radio.git] / library / Zend / Reflection / Extension.php
blob7d3e6e504971c9e8277cdc2ffba2a2ebcd98a522
1 <?php
2 /**
3 * Zend Framework
5 * LICENSE
7 * This source file is subject to the new BSD license that is bundled
8 * with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://framework.zend.com/license/new-bsd
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
13 * to license@zend.com so we can send you a copy immediately.
15 * @category Zend
16 * @package Zend_Reflection
17 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
18 * @license http://framework.zend.com/license/new-bsd New BSD License
19 * @version $Id$
22 /**
23 * @see Zend_Reflection_Class
25 require_once 'Zend/Reflection/Class.php';
27 /**
28 * @see Zend_Reflection_Function
30 require_once 'Zend/Reflection/Function.php';
32 /**
33 * @category Zend
34 * @package Zend_Reflection
35 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
36 * @license http://framework.zend.com/license/new-bsd New BSD License
38 class Zend_Reflection_Extension extends ReflectionExtension
40 /**
41 * Get extension function reflection objects
43 * @param string $reflectionClass Name of reflection class to use
44 * @return array Array of Zend_Reflection_Function objects
46 public function getFunctions($reflectionClass = 'Zend_Reflection_Function')
48 $phpReflections = parent::getFunctions();
49 $zendReflections = array();
50 while ($phpReflections && ($phpReflection = array_shift($phpReflections))) {
51 $instance = new $reflectionClass($phpReflection->getName());
52 if (!$instance instanceof Zend_Reflection_Function) {
53 require_once 'Zend/Reflection/Exception.php';
54 throw new Zend_Reflection_Exception('Invalid reflection class provided; must extend Zend_Reflection_Function');
56 $zendReflections[] = $instance;
57 unset($phpReflection);
59 unset($phpReflections);
60 return $zendReflections;
63 /**
64 * Get extension class reflection objects
66 * @param string $reflectionClass Name of reflection class to use
67 * @return array Array of Zend_Reflection_Class objects
69 public function getClasses($reflectionClass = 'Zend_Reflection_Class')
71 $phpReflections = parent::getClasses();
72 $zendReflections = array();
73 while ($phpReflections && ($phpReflection = array_shift($phpReflections))) {
74 $instance = new $reflectionClass($phpReflection->getName());
75 if (!$instance instanceof Zend_Reflection_Class) {
76 require_once 'Zend/Reflection/Exception.php';
77 throw new Zend_Reflection_Exception('Invalid reflection class provided; must extend Zend_Reflection_Class');
79 $zendReflections[] = $instance;
80 unset($phpReflection);
82 unset($phpReflections);
83 return $zendReflections;