Re: Services_Twitter documentation
| From: | David Jean Louis | Date: | Tue, 15 Sep 2009 11:56:09 +0000 |
| Subject: | Re: Services_Twitter documentation | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-52837@lists.php.net to get a copy of this message | ||
till a écrit :
On Mon, Sep 14, 2009 at 11:46 PM, Chuck Burgess <demon.gene@gmail.com> wrote:It is... but what I meant was that you cannot document "nested" dynamic calls, eg.: <?php class Foo {On Mon, Sep 14, 2009 at 8:33 AM, till <klimpong@gmail.com> wrote:$twitter->category->method() Isn't category a property/class variable? Till@property-read and -write, if I am not mistaken. :-)Those tags are for magic properties, not methods...
protected $prefix = null;
public function __get($key) {
$this->prefix = $key;
return $this;
}
public function __call($method, $params = array()) {
if ($this->prefix) {
echo "Foo::{$this->prefix}::{$method}() called !\n";
$this->prefix = null;
return;
}
echo "Foo::{$method}() called !\n";
}
}
$foo = new Foo();
$foo->baz(); // can be documented with the @method keyword$foo->bar->baz(); // cannot be documented with phpdoc ?> -- David