import v2.0.0.0_RC3 | 2012-07-01
https://github.com/lucanos/CommunityID -> http://www.itadmins.net/archives/357
This commit is contained in:
@ -16,7 +16,7 @@
|
||||
* @package Zend_Reflection
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Parameter.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: Parameter.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -25,13 +25,13 @@
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Reflection_Parameter extends ReflectionParameter
|
||||
class Zend_Reflection_Parameter extends ReflectionParameter
|
||||
{
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $_isFromMethod = false;
|
||||
|
||||
|
||||
/**
|
||||
* Get declaring class reflection object
|
||||
*
|
||||
@ -49,7 +49,7 @@ class Zend_Reflection_Parameter extends ReflectionParameter
|
||||
unset($phpReflection);
|
||||
return $zendReflection;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get class reflection object
|
||||
*
|
||||
@ -59,6 +59,10 @@ class Zend_Reflection_Parameter extends ReflectionParameter
|
||||
public function getClass($reflectionClass = 'Zend_Reflection_Class')
|
||||
{
|
||||
$phpReflection = parent::getClass();
|
||||
if($phpReflection == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$zendReflection = new $reflectionClass($phpReflection->getName());
|
||||
if (!$zendReflection instanceof Zend_Reflection_Class) {
|
||||
require_once 'Zend/Reflection/Exception.php';
|
||||
@ -67,7 +71,7 @@ class Zend_Reflection_Parameter extends ReflectionParameter
|
||||
unset($phpReflection);
|
||||
return $zendReflection;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get declaring function reflection object
|
||||
*
|
||||
@ -97,7 +101,7 @@ class Zend_Reflection_Parameter extends ReflectionParameter
|
||||
unset($phpReflection);
|
||||
return $zendReflection;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get parameter type
|
||||
*
|
||||
@ -107,13 +111,13 @@ class Zend_Reflection_Parameter extends ReflectionParameter
|
||||
{
|
||||
if ($docblock = $this->getDeclaringFunction()->getDocblock()) {
|
||||
$params = $docblock->getTags('param');
|
||||
|
||||
if (isset($params[$this->getPosition() - 1])) {
|
||||
return $params[$this->getPosition() - 1]->getType();
|
||||
|
||||
if (isset($params[$this->getPosition()])) {
|
||||
return $params[$this->getPosition()]->getType();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user