import v1.1.0_beta1 | 2009-08-21
This commit is contained in:
@ -23,11 +23,6 @@
|
||||
*/
|
||||
require_once 'Zend/Server/Reflection/Method.php';
|
||||
|
||||
/**
|
||||
* Zend_Server_Reflection_Exception
|
||||
*/
|
||||
require_once 'Zend/Server/Reflection/Exception.php';
|
||||
|
||||
/**
|
||||
* Class/Object reflection
|
||||
*
|
||||
@ -39,7 +34,7 @@ require_once 'Zend/Server/Reflection/Exception.php';
|
||||
* @subpackage Reflection
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Class.php 12619 2008-11-13 15:24:29Z alexander $
|
||||
* @version $Id: Class.php 13217 2008-12-14 11:09:37Z thomas $
|
||||
*/
|
||||
class Zend_Server_Reflection_Class
|
||||
{
|
||||
@ -110,6 +105,7 @@ class Zend_Server_Reflection_Class
|
||||
return call_user_func_array(array($this->_reflection, $method), $args);
|
||||
}
|
||||
|
||||
require_once 'Zend/Server/Reflection/Exception.php';
|
||||
throw new Zend_Server_Reflection_Exception('Invalid reflection method');
|
||||
}
|
||||
|
||||
@ -180,6 +176,7 @@ class Zend_Server_Reflection_Class
|
||||
}
|
||||
|
||||
if (!is_string($namespace) || !preg_match('/[a-z0-9_\.]+/i', $namespace)) {
|
||||
require_once 'Zend/Server/Reflection/Exception.php';
|
||||
throw new Zend_Server_Reflection_Exception('Invalid namespace');
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ require_once 'Zend/Exception.php';
|
||||
* @subpackage Reflection
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Exception.php 12619 2008-11-13 15:24:29Z alexander $
|
||||
* @version $Id: Exception.php 12618 2008-11-13 15:23:05Z alexander $
|
||||
*/
|
||||
class Zend_Server_Reflection_Exception extends Zend_Exception
|
||||
{
|
||||
|
@ -32,7 +32,7 @@ require_once 'Zend/Server/Reflection/Function/Abstract.php';
|
||||
* @subpackage Reflection
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Function.php 12619 2008-11-13 15:24:29Z alexander $
|
||||
* @version $Id: Function.php 12618 2008-11-13 15:23:05Z alexander $
|
||||
*/
|
||||
class Zend_Server_Reflection_Function extends Zend_Server_Reflection_Function_Abstract
|
||||
{
|
||||
|
@ -18,11 +18,6 @@
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
|
||||
/**
|
||||
* Zend_Server_Reflection_Exception
|
||||
*/
|
||||
require_once 'Zend/Server/Reflection/Exception.php';
|
||||
|
||||
/**
|
||||
* Zend_Server_Reflection_Node
|
||||
*/
|
||||
@ -53,7 +48,7 @@ require_once 'Zend/Server/Reflection/Prototype.php';
|
||||
* @subpackage Reflection
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Abstract.php 12619 2008-11-13 15:24:29Z alexander $
|
||||
* @version $Id: Abstract.php 16097 2009-06-17 01:41:42Z yoshida@zend.co.jp $
|
||||
*/
|
||||
abstract class Zend_Server_Reflection_Function_Abstract
|
||||
{
|
||||
@ -120,6 +115,7 @@ abstract class Zend_Server_Reflection_Function_Abstract
|
||||
// testing here.
|
||||
if ((!$r instanceof ReflectionFunction)
|
||||
&& (!$r instanceof ReflectionMethod)) {
|
||||
require_once 'Zend/Server/Reflection/Exception.php';
|
||||
throw new Zend_Server_Reflection_Exception('Invalid reflection class');
|
||||
}
|
||||
$this->_reflection = $r;
|
||||
@ -340,9 +336,10 @@ abstract class Zend_Server_Reflection_Function_Abstract
|
||||
}
|
||||
|
||||
if (count($paramTypesTmp) != $paramCount) {
|
||||
require_once 'Zend/Server/Reflection/Exception.php';
|
||||
throw new Zend_Server_Reflection_Exception(
|
||||
'Variable number of arguments is not supported for services (except optional parameters). '
|
||||
. 'Number of function arguments must currespond to actual number of arguments described in a docblock.');
|
||||
. 'Number of function arguments must correspond to actual number of arguments described in a docblock.');
|
||||
}
|
||||
|
||||
$paramTypes = array();
|
||||
@ -371,6 +368,7 @@ abstract class Zend_Server_Reflection_Function_Abstract
|
||||
return call_user_func_array(array($this->_reflection, $method), $args);
|
||||
}
|
||||
|
||||
require_once 'Zend/Server/Reflection/Exception.php';
|
||||
throw new Zend_Server_Reflection_Exception('Invalid reflection method ("' .$method. '")');
|
||||
}
|
||||
|
||||
@ -420,6 +418,7 @@ abstract class Zend_Server_Reflection_Function_Abstract
|
||||
}
|
||||
|
||||
if (!is_string($namespace) || !preg_match('/[a-z0-9_\.]+/i', $namespace)) {
|
||||
require_once 'Zend/Server/Reflection/Exception.php';
|
||||
throw new Zend_Server_Reflection_Exception('Invalid namespace');
|
||||
}
|
||||
|
||||
@ -445,6 +444,7 @@ abstract class Zend_Server_Reflection_Function_Abstract
|
||||
public function setDescription($string)
|
||||
{
|
||||
if (!is_string($string)) {
|
||||
require_once 'Zend/Server/Reflection/Exception.php';
|
||||
throw new Zend_Server_Reflection_Exception('Invalid description');
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ require_once 'Zend/Server/Reflection/Function/Abstract.php';
|
||||
* @subpackage Reflection
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Method.php 12619 2008-11-13 15:24:29Z alexander $
|
||||
* @version $Id: Method.php 12618 2008-11-13 15:23:05Z alexander $
|
||||
*/
|
||||
class Zend_Server_Reflection_Method extends Zend_Server_Reflection_Function_Abstract
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
||||
* @category Zend
|
||||
* @package Zend_Server
|
||||
* @subpackage Reflection
|
||||
* @version $Id: Node.php 12619 2008-11-13 15:24:29Z alexander $
|
||||
* @version $Id: Node.php 12618 2008-11-13 15:23:05Z alexander $
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
|
@ -18,11 +18,6 @@
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
|
||||
/**
|
||||
* Zend_Server_Reflection_Exception
|
||||
*/
|
||||
require_once 'Zend/Server/Reflection/Exception.php';
|
||||
|
||||
/**
|
||||
* Parameter Reflection
|
||||
*
|
||||
@ -33,7 +28,7 @@ require_once 'Zend/Server/Reflection/Exception.php';
|
||||
* @subpackage Reflection
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Parameter.php 12619 2008-11-13 15:24:29Z alexander $
|
||||
* @version $Id: Parameter.php 13217 2008-12-14 11:09:37Z thomas $
|
||||
*/
|
||||
class Zend_Server_Reflection_Parameter
|
||||
{
|
||||
@ -87,6 +82,7 @@ class Zend_Server_Reflection_Parameter
|
||||
return call_user_func_array(array($this->_reflection, $method), $args);
|
||||
}
|
||||
|
||||
require_once 'Zend/Server/Reflection/Exception.php';
|
||||
throw new Zend_Server_Reflection_Exception('Invalid reflection method');
|
||||
}
|
||||
|
||||
@ -109,6 +105,7 @@ class Zend_Server_Reflection_Parameter
|
||||
public function setType($type)
|
||||
{
|
||||
if (!is_string($type) && (null !== $type)) {
|
||||
require_once 'Zend/Server/Reflection/Exception.php';
|
||||
throw new Zend_Server_Reflection_Exception('Invalid parameter type');
|
||||
}
|
||||
|
||||
@ -134,6 +131,7 @@ class Zend_Server_Reflection_Parameter
|
||||
public function setDescription($description)
|
||||
{
|
||||
if (!is_string($description) && (null !== $description)) {
|
||||
require_once 'Zend/Server/Reflection/Exception.php';
|
||||
throw new Zend_Server_Reflection_Exception('Invalid parameter description');
|
||||
}
|
||||
|
||||
|
@ -18,11 +18,6 @@
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
|
||||
/**
|
||||
* Zend_Server_Reflection_Exception
|
||||
*/
|
||||
require_once 'Zend/Server/Reflection/Exception.php';
|
||||
|
||||
/**
|
||||
* Zend_Server_Reflection_ReturnValue
|
||||
*/
|
||||
@ -43,7 +38,7 @@ require_once 'Zend/Server/Reflection/Parameter.php';
|
||||
* @subpackage Reflection
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Prototype.php 12619 2008-11-13 15:24:29Z alexander $
|
||||
* @version $Id: Prototype.php 13217 2008-12-14 11:09:37Z thomas $
|
||||
*/
|
||||
class Zend_Server_Reflection_Prototype
|
||||
{
|
||||
@ -59,12 +54,14 @@ class Zend_Server_Reflection_Prototype
|
||||
$this->_return = $return;
|
||||
|
||||
if (!is_array($params) && (null !== $params)) {
|
||||
require_once 'Zend/Server/Reflection/Exception.php';
|
||||
throw new Zend_Server_Reflection_Exception('Invalid parameters');
|
||||
}
|
||||
|
||||
if (is_array($params)) {
|
||||
foreach ($params as $param) {
|
||||
if (!$param instanceof Zend_Server_Reflection_Parameter) {
|
||||
require_once 'Zend/Server/Reflection/Exception.php';
|
||||
throw new Zend_Server_Reflection_Exception('One or more params are invalid');
|
||||
}
|
||||
}
|
||||
|
@ -18,11 +18,6 @@
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
|
||||
/**
|
||||
* Zend_Server_Reflection_Exception
|
||||
*/
|
||||
require_once 'Zend/Server/Reflection/Exception.php';
|
||||
|
||||
/**
|
||||
* Return value reflection
|
||||
*
|
||||
@ -33,7 +28,7 @@ require_once 'Zend/Server/Reflection/Exception.php';
|
||||
* @subpackage Reflection
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ReturnValue.php 12619 2008-11-13 15:24:29Z alexander $
|
||||
* @version $Id: ReturnValue.php 13217 2008-12-14 11:09:37Z thomas $
|
||||
*/
|
||||
class Zend_Server_Reflection_ReturnValue
|
||||
{
|
||||
@ -80,6 +75,7 @@ class Zend_Server_Reflection_ReturnValue
|
||||
public function setType($type)
|
||||
{
|
||||
if (!is_string($type) && (null !== $type)) {
|
||||
require_once 'Zend/Server/Reflection/Exception.php';
|
||||
throw new Zend_Server_Reflection_Exception('Invalid parameter type');
|
||||
}
|
||||
|
||||
@ -105,6 +101,7 @@ class Zend_Server_Reflection_ReturnValue
|
||||
public function setDescription($description)
|
||||
{
|
||||
if (!is_string($description) && (null !== $description)) {
|
||||
require_once 'Zend/Server/Reflection/Exception.php';
|
||||
throw new Zend_Server_Reflection_Exception('Invalid parameter description');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user