zend_object_store_get_object validation

From: Date: Mon, 08 Dec 2008 16:02:02 +0000
Subject: zend_object_store_get_object validation
Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-5974@lists.php.net to get a copy of this message
Hi! What is the best practice to validate pointer returned from zend_object_store_get_object ? I am interested in cases when I get object as zval and I use my own structure when accepted object has been created. So simply I have something underlying: mo = (struct my_object_struct*)zend_object_store_get_object(object TSRMLS_CC); What if object is user defined and not my object? If such validation should be done when parsing function parameter, what is the best practice? Can I set own validation function to arguments' parser? Or should I "walk up" class' parent pointer and check if this is indeed the object I need? I couldn't find but is there some zend routine which checks objects and derived ones? Is '0' type used with zend_parse_parameters usable for such purpose? Piotras

« previous php.pecl.dev (#5974) next »