cvs: ZendEngine2(PHP_5_0) / zend_reflection_api.c

From: Date: Mon, 19 Jul 2004 19:24:38 +0000
Subject: cvs: ZendEngine2(PHP_5_0) / zend_reflection_api.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-2780@lists.php.net to get a copy of this message
helly Mon Jul 19 15:24:38 2004 EDT Modified files: (Branch: PHP_5_0) /ZendEngine2 zend_reflection_api.c Log: - MFH protos and error message http://cvs.php.net/diff.php/ZendEngine2/zend_reflection_api.c?r1=1.111&r2=1.111.2.1&ty=u Index: ZendEngine2/zend_reflection_api.c diff -u ZendEngine2/zend_reflection_api.c:1.111 ZendEngine2/zend_reflection_api.c:1.111.2.1 --- ZendEngine2/zend_reflection_api.c:1.111 Sat Jun 19 12:52:04 2004 +++ ZendEngine2/zend_reflection_api.c Mon Jul 19 15:24:37 2004 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_reflection_api.c,v 1.111 2004/06/19 16:52:04 sebastian Exp $ */ +/* $Id: zend_reflection_api.c,v 1.111.2.1 2004/07/19 19:24:37 helly Exp $ */ #include "zend.h" #include "zend_API.h" #include "zend_exceptions.h" @@ -1541,7 +1541,7 @@ } /* }}} */ -/* {{{ proto public ReflectionClass Reflection_Parameter::getClass() +/* {{{ proto public ReflectionClass ReflectionParameter::getClass() Returns this parameters's class hint or NULL if there is none */ ZEND_METHOD(reflection_parameter, getClass) { @@ -1879,7 +1879,7 @@ } /* }}} */ -/* {{{ proto public ReflectionClass Reflection_Method::getDeclaringClass() +/* {{{ proto public ReflectionClass ReflectionMethod::getDeclaringClass() Get the declaring class */ ZEND_METHOD(reflection_method, getDeclaringClass) { @@ -2134,7 +2134,7 @@ } /* }}} */ -/* {{{ proto public ReflectionMethod Reflection_Class::getConstructor() +/* {{{ proto public ReflectionMethod ReflectionClass::getConstructor() Returns the class' constructor if there is one, NULL otherwise */ ZEND_METHOD(reflection_class, getConstructor) { @@ -2152,7 +2152,7 @@ } /* }}} */ -/* {{{ proto public ReflectionMethod Reflection_Class::getMethod(string name) +/* {{{ proto public ReflectionMethod ReflectionClass::getMethod(string name) throws ReflectionException Returns the class' method specified by it's name */ ZEND_METHOD(reflection_class, getMethod) { @@ -2172,7 +2172,9 @@ if (zend_hash_find(&ce->function_table, name, name_len + 1, (void**) &mptr) == SUCCESS) { reflection_method_factory(ce, mptr, return_value TSRMLS_CC); } else { - RETURN_NULL(); + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + "Method %s does not exist", name); + return; } } /* }}} */ @@ -2195,7 +2197,7 @@ } /* }}} */ -/* {{{ proto public ReflectionMethod[] Reflection_Class::getMethods() +/* {{{ proto public ReflectionMethod[] ReflectionClass::getMethods() Returns an array of this class' methods */ ZEND_METHOD(reflection_class, getMethods) { @@ -2221,7 +2223,7 @@ } /* }}} */ -/* {{{ proto public ReflectionProperty Reflection_Class::getProperty(string name) +/* {{{ proto public ReflectionProperty ReflectionClass::getProperty(string name) throws ReflectionException Returns the class' property specified by it's name */ ZEND_METHOD(reflection_class, getProperty) { @@ -2240,7 +2242,9 @@ if (zend_hash_find(&ce->properties_info, name, name_len + 1, (void**) &property_info) == SUCCESS) { reflection_property_factory(ce, property_info, return_value TSRMLS_CC); } else { - RETURN_NULL(); + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, + "Property %s does not exist", name); + return; } } /* }}} */ @@ -2263,7 +2267,7 @@ } /* }}} */ -/* {{{ proto public ReflectionProperty[] Reflection_Class::getProperties() +/* {{{ proto public ReflectionProperty[] ReflectionClass::getProperties() Returns an array of this class' properties */ ZEND_METHOD(reflection_class, getProperties) { @@ -2478,7 +2482,7 @@ } /* }}} */ -/* {{{ proto public ReflectionClass[] Reflection_Class::getInterfaces() +/* {{{ proto public ReflectionClass[] ReflectionClass::getInterfaces() Returns an array of interfaces this class implements */ ZEND_METHOD(reflection_class, getInterfaces) { @@ -2504,7 +2508,7 @@ } /* }}} */ -/* {{{ proto public ReflectionClass Reflection_Class::getParentClass() +/* {{{ proto public ReflectionClass ReflectionClass::getParentClass() Returns the class' parent class, or, if none exists, FALSE */ ZEND_METHOD(reflection_class, getParentClass) { @@ -2541,7 +2545,7 @@ case IS_STRING: if (zend_lookup_class(Z_STRVAL_P(class_name), Z_STRLEN_P(class_name), &pce TSRMLS_CC) == FAILURE) { zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, - "Interface %s doesn't exist", Z_STRVAL_P(class_name)); + "Interface %s does not exist", Z_STRVAL_P(class_name)); return; } class_ce = *pce; @@ -2587,7 +2591,7 @@ case IS_STRING: if (zend_lookup_class(Z_STRVAL_P(interface), Z_STRLEN_P(interface), &pce TSRMLS_CC) == FAILURE) { zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, - "Interface %s doesn't exist", Z_STRVAL_P(interface)); + "Interface %s does not exist", Z_STRVAL_P(interface)); return; } interface_ce = *pce; @@ -2953,7 +2957,7 @@ } /* }}} */ -/* {{{ proto public ReflectionClass Reflection_Property::getDeclaringClass() +/* {{{ proto public ReflectionClass ReflectionProperty::getDeclaringClass() Get the declaring class */ ZEND_METHOD(reflection_property, getDeclaringClass) { @@ -3056,7 +3060,7 @@ } /* }}} */ -/* {{{ proto public ReflectionFunction[] Reflection_Extension::getFunctions() +/* {{{ proto public ReflectionFunction[] ReflectionExtension::getFunctions() Returns an array of this extension's fuctions */ ZEND_METHOD(reflection_extension, getFunctions) {

« previous php.zend-engine.cvs (#2780) next »