NuSphere Forums Forum Index
NuSphere Forums
Reply to topic


Joined: 27 Mar 2006
Posts: 77
Reply with quote
Well, thanks for using tags that correspond to a useful tool then. Very Happy
I look forward to this update!

Keep up the good work.

TW
View user's profileFind all posts by twSend private message


Joined: 27 Mar 2006
Posts: 77
Reply with quote
I saw this today and remembered this thread.
Seams similar.

http://manual.phpdoc.org/HTMLframesConverter/DOM/earthli/phpDocumentor/tutorial_tags.property.pkg.html

Code:
 
 1. /**
 2.   * show off @property, @property-read, @property-write
 3.   *
 4.   * @property mixed $regular regular read/write property
 5.   * @property-read int $foo the foo prop
 6.   * @property-write string $bar the bar prop
 7.   */
 8.  class Magician
 9.  {
  10.private $_thingy;
  11. private $_bar;
  12.   
  13. function __get($var)
  14. {
  15.     switch ($var) {
  16.     case 'foo' :
  17.          return 45;
  18.     case 'regular' :
  19.          return $this->_thingy;
  20.  }}
  21.
     
  22. function __set($var, $val)
  23. {
  24.      switch ($var) {
  25.      case 'bar' :
  26.            $this->_bar = $val;
  27.            break;
  28.       case 'regular' :
  29.            if (is_string($val)) {
  30.                    $this->_thingy = $val;
  31. }}}
  32. }
View user's profileFind all posts by twSend private message


Joined: 16 Apr 2007
Posts: 3
Reply with quote
Working with php5 a lot I always thought about how useful it would be to have a feature to
enable outcompletion of properties that are to be used with __get and __set.
I recently stumbled upon the same phpdoc page that tw mentions.

I realize there has been no response to this thread for about a year,so there might not be
many users around that could use this, but is there a chance to have this feature in phped?
View user's profileFind all posts by TharitSend private message


Joined: 21 Jan 2008
Posts: 19
Reply with quote
I asked for this feature also, but no answer from Nusphere team.
View user's profileFind all posts by wenihalSend private message
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
Thanks a lot for posting that link tw. I've just started to use __get and __set and I was wondering how to document the actual properties Smile
I hope the feature makes it into phpED.
View user's profileFind all posts by BlizzSend private messageVisit poster's website


Joined: 27 Mar 2006
Posts: 77
Reply with quote
I am glad intrest is peaking for this feature. I have tried every new release since this was posted hoping either method would be implemented...
View user's profileFind all posts by twSend private message
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
And since we are on the subject, I would love to see the same functionality for the __call magic function (@method tag - source)
It is impossible for PhpED to guess the properties and dynamic methods but if those tags are specified it should be doable, no? Smile
View user's profileFind all posts by BlizzSend private messageVisit poster's website


Joined: 13 Feb 2008
Posts: 32
Reply with quote
I second that. I just started thread looking for help on autocompletion with the @property tags. It would help me out allot, especially with databases.

code-complete-displaying-private-protected-items-t4686.html
View user's profileFind all posts by linchatSend private message
Code Completion
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 2 of 2  

  
  
 Reply to topic