[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pear-general
Subject:    [PEAR] Re: [PHP] Using PHPDocumentor to document the magic functions.
From:       Richard Quadling <rquadling () googlemail ! com>
Date:       2010-01-12 12:30:04
Message-ID: 10845a341001120430k7a00d0c1u25c3e18e1f3adfbd () mail ! gmail ! com
[Download RAW message or body]

2010/1/12 Jochem Maas <jochem@iamjochem.com>:
> Op 1/12/10 12:46 PM, Richard Quadling schreef:
>> Hi.
>>
>> To implement public readonly properties you can use getX(), getY(),
>> getZ() methods (which then access the private vars) or you can use
>> __get($var) to consolidate/simplify the number of methods.
>>
>> With the discrete getters() it is easy to docblock them. Everything is
>> obvious, but there is a LOT of duplicate code and documentation.
>>
>> But how do you docblock __get()?
>>
>> With the magic functions __get(), __set(), __call(), __callStatic(),
>> they act as proxies. It is NOT the proxy itself that is normally
>> wanted to be documented (maybe in a cursory manner), but what is being
>> proxied.
>>
>>
>> If you are creating a WSDL file for SOAP and have __get() and
>> __call(), then you would want to document each entry but without the
>> code duplication.
>>
>>
>> What is the best approach?
>>
>
> this is a difficult problem, probably no real answer to it right now.
> I vaguely remember Derick Rethans mailing about this issue in regard to
> the ezComponents lib ... you might want to check that codebase for inspiration
> and or STW for what he had to say on the matter.
>
>>
>> Regards,
>>
>> Richard Quadling.
>>
>
>

@property and @method are my friends. Gee! Wood for trees.

Thanks.

-- 
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

-- 
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic