}
/* }}} */
-/* {{{ 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)
{
}
/* }}} */
-/* {{{ proto public ReflectionClass Reflection_Method::getDeclaringClass()
+/* {{{ proto public ReflectionClass ReflectionMethod::getDeclaringClass()
Get the declaring class */
ZEND_METHOD(reflection_method, getDeclaringClass)
{
}
/* }}} */
-/* {{{ 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)
{
}
/* }}} */
-/* {{{ 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)
{
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;
}
}
/* }}} */
}
/* }}} */
-/* {{{ proto public ReflectionMethod[] Reflection_Class::getMethods()
+/* {{{ proto public ReflectionMethod[] ReflectionClass::getMethods()
Returns an array of this class' methods */
ZEND_METHOD(reflection_class, getMethods)
{
}
/* }}} */
-/* {{{ 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)
{
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;
}
}
/* }}} */
}
/* }}} */
-/* {{{ proto public ReflectionProperty[] Reflection_Class::getProperties()
+/* {{{ proto public ReflectionProperty[] ReflectionClass::getProperties()
Returns an array of this class' properties */
ZEND_METHOD(reflection_class, getProperties)
{
}
/* }}} */
-/* {{{ proto public ReflectionClass[] Reflection_Class::getInterfaces()
+/* {{{ proto public ReflectionClass[] ReflectionClass::getInterfaces()
Returns an array of interfaces this class implements */
ZEND_METHOD(reflection_class, getInterfaces)
{
}
/* }}} */
-/* {{{ 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)
{
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;
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;
}
/* }}} */
-/* {{{ proto public ReflectionClass Reflection_Property::getDeclaringClass()
+/* {{{ proto public ReflectionClass ReflectionProperty::getDeclaringClass()
Get the declaring class */
ZEND_METHOD(reflection_property, getDeclaringClass)
{
}
/* }}} */
-/* {{{ proto public ReflectionFunction[] Reflection_Extension::getFunctions()
+/* {{{ proto public ReflectionFunction[] ReflectionExtension::getFunctions()
Returns an array of this extension's fuctions */
ZEND_METHOD(reflection_extension, getFunctions)
{
}
/* }}} */
-/* {{{ 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)
{
}
/* }}} */
-/* {{{ proto public ReflectionClass Reflection_Method::getDeclaringClass()
+/* {{{ proto public ReflectionClass ReflectionMethod::getDeclaringClass()
Get the declaring class */
ZEND_METHOD(reflection_method, getDeclaringClass)
{
}
/* }}} */
-/* {{{ 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)
{
}
/* }}} */
-/* {{{ 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)
{
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;
}
}
/* }}} */
}
/* }}} */
-/* {{{ proto public ReflectionMethod[] Reflection_Class::getMethods()
+/* {{{ proto public ReflectionMethod[] ReflectionClass::getMethods()
Returns an array of this class' methods */
ZEND_METHOD(reflection_class, getMethods)
{
}
/* }}} */
-/* {{{ 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)
{
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;
}
}
/* }}} */
}
/* }}} */
-/* {{{ proto public ReflectionProperty[] Reflection_Class::getProperties()
+/* {{{ proto public ReflectionProperty[] ReflectionClass::getProperties()
Returns an array of this class' properties */
ZEND_METHOD(reflection_class, getProperties)
{
}
/* }}} */
-/* {{{ proto public ReflectionClass[] Reflection_Class::getInterfaces()
+/* {{{ proto public ReflectionClass[] ReflectionClass::getInterfaces()
Returns an array of interfaces this class implements */
ZEND_METHOD(reflection_class, getInterfaces)
{
}
/* }}} */
-/* {{{ 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)
{
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;
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;
}
/* }}} */
-/* {{{ proto public ReflectionClass Reflection_Property::getDeclaringClass()
+/* {{{ proto public ReflectionClass ReflectionProperty::getDeclaringClass()
Get the declaring class */
ZEND_METHOD(reflection_property, getDeclaringClass)
{
}
/* }}} */
-/* {{{ proto public ReflectionFunction[] Reflection_Extension::getFunctions()
+/* {{{ proto public ReflectionFunction[] ReflectionExtension::getFunctions()
Returns an array of this extension's fuctions */
ZEND_METHOD(reflection_extension, getFunctions)
{