Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32488 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47409 invoked by uid 1010); 28 Sep 2007 10:57:39 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 47394 invoked from network); 28 Sep 2007 10:57:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Sep 2007 10:57:39 -0000 Authentication-Results: pb1.pair.com header.from=alon@f4w.nl; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=alon@f4w.nl; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain f4w.nl from 85.158.248.184 cause and error) X-PHP-List-Original-Sender: alon@f4w.nl X-Host-Fingerprint: 85.158.248.184 f4w04.dedicated.vdx.nl Received: from [85.158.248.184] ([85.158.248.184:49976] helo=f4w04.dedicated.vdx.nl) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6A/E2-13331-12EDCF64 for ; Fri, 28 Sep 2007 06:57:39 -0400 X-ClientAddr: 82.95.17.39 Received: from apollo.lan (a82-95-17-39.adsl.xs4all.nl [82.95.17.39]) (authenticated bits=0) by f4w04.dedicated.vdx.nl (8.13.1/8.13.1) with ESMTP id l8SAvXi4025572 for ; Fri, 28 Sep 2007 12:57:34 +0200 To: internals@lists.php.net Date: Fri, 28 Sep 2007 12:57:34 +0200 User-Agent: KMail/1.9.6 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-ID: <200709281257.34488.alon@f4w.nl> X-Virtual-Dynamix-f4w04-MailScanner-Information: Please contact Virtual Dynamix (www.vdx.nl) for more information X-Virtual-Dynamix-f4w04-MailScanner: Not scanned: please contact your Internet E-Mail Service Provider for details X-MailScanner-From: alon@f4w.nl Subject: using zend_parse_parameters to get an object of an externally defined class From: alon@f4w.nl (alon) A newbie question: How can I use zend_parse_parameters to accept object of an external class as parametr. I want for example to build a method that accepts 'DateTime' objects. I know that the syntax of zend_parse_parameters is something like: zval *obj; zend_class_entry ce; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &obj, ce, &d) == FAILURE) { return; } But how do I initiate the zend_class_entry to specify an object of the DateTime class?