Re: Proposal for a new extension AMFEXT
| From: | Emanuele Ruffaldi | Date: | Wed, 06 Jun 2007 18:11:58 +0000 |
| Subject: | Re: Proposal for a new extension AMFEXT | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-4716@lists.php.net to get a copy of this message | ||
I will take inspiration from tidy
Best,
Ema
>> It is painful to maintain two APIs when one has actually no benefit
>
> I don't see how it's painful - dual API looks like this:
>
> /* {{{ proto array Collator::sort(array input) U
> Sort an array using collation }}} */
> /* {{{ proto array collator_sort(Collator coll, array input) U
> Sort an array using collation */
> PHP_FUNCTION(collator_sort)
> {
> zval *object;
> php_collator_obj *collatorobj;
> zval *array;
> HashTable *target_hash;
> zend_collator *orig_collator;
>
> if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
> getThis(), "Oa/", &object, unicode_collator_ce, &array) == FAILURE) {
> RETURN_FALSE;
> }
> collatorobj = (php_collator_obj *)
> zend_object_store_get_object(object TSRMLS_CC);
>
> What's painful in it? Maybe you need a couple of additional methods -
> like ctor method for functional API - but that should be it.
--
Emanuele Ruffaldi
Research Fellow - PhD.
Scuola Superiore Sant'Anna di Pisa
PERCRO Lab - Virtual Reality and
Telerobotic Systems Division
via Martiri 11
56100 Pisa - ITALY
Tel.: +39 050 838 980
Fax.: +39 050 883 333
E-mail: emanuele.ruffaldi@sssup.it
Web: http://www.teslacore.it
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc