[PHP] PHPDoc way to describe the magic getter/setters [SOLVED]

2013-09-25 Thread Daevid Vincent
I use a base.class that most classes extend from. That class uses the lovely
Magic Methods for overloading __get() and __set()
http://php.net/manual/en/language.oop5.magic.php
 
However (in Zend Studio for example) when I try to auto-assist a property
$foo I don't see that it has a get() or set() method.
 
I'd like to see something like $this-get_foo() or $this-set_foo()  and
also if possible have them show up in the Outline tab window.
 
Then I randomly stumbled upon this PHPDoc  @ method tag and my whole world
is brighter today than it has been for the past, oh let's say DECADE!
http://manual.phpdoc.org/HTMLSmartyConverter/PHP/phpDocumentor/tutorial_tags
.method.pkg.html
or @property too.
http://manual.phpdoc.org/HTMLSmartyConverter/PHP/phpDocumentor/tutorial_tags
.property.pkg.html
 
*giddy!* 
(now I just have to go back through all my code and update the class
documentation headers everywhere)
 
?php
/**
* This is an example of how to use PHPDoc to describe the magic __get() and
__set()
* so that Zend Studio / Eclipse / Other IDEs can utilize the methods that
don't technically exist.
*
* @methodvoid set_name() set_name(string $name) magic setter for $name
property
* @methodstring get_name() get_name() magic getter for $name property
*
* @link
http://manual.phpdoc.org/HTMLSmartyConverter/PHP/phpDocumentor/tutorial_tags
.method.pkg.html
* @link
http://manual.phpdoc.org/HTMLSmartyConverter/PHP/phpDocumentor/tutorial_tags
.property.pkg.html
*/
class foo
{
   /**
   * @var string $name the description of $name goes here
   */
   protected $name;
 
   public function __construct($id = NULL)
   {
   }
}
 
$myobj = new foo();
 
 Put your cursor after the - and hit CTRL+SPACE.
 Notice how you have magic get_name() and set_name($name)  
 appearing and also in the Eclipse Outline pane
 
$myobj-
 
 You're welcome. 
?


Re: [PHP] PHPDoc way to describe the magic getter/setters [SOLVED]

2013-09-25 Thread David Harkness
On Wed, Sep 25, 2013 at 4:31 PM, Daevid Vincent dae...@daevid.com wrote:

 Then I randomly stumbled upon this PHPDoc  @ method tag and my whole world
 is brighter today than it has been for the past, oh let's say DECADE!


Yes, @method and @property are very handy. Out of curiosity, since you're
providing magic getters and setters, why not use __get and __set instead of
__call with matching on get_xxx and set_xxx? This would allow using the
simpler (and IMHO much more expressive and PHP-ish) forms

$obj-foo = $obj-bar + 5;

Peace,
David


[PHP] PHPDoc (not PhD) question.

2010-02-18 Thread Richard Quadling
Hello.

Does anyone have any other templates for PHPDoc?

I've found zym's ExtJS PHPDoc template, but this doesn't seem to be
maintained and there are a few bugs (source code not styled, source
code rendered as external windows with broken links, ordered and
unordered lists not rendered with appropriate styling, etc.).

Any suggestsions, fixes, alternatives.

Regards,

Richard.

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

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



[PHP] PHPDoc autocomplete hints

2008-02-26 Thread Thiago Pojda
Guys,
 
I'm new to this thing and I'm not sure if it's my IDE (ZendStudioNeon)
problem, or if I'm doing something wrong. I always use PHPDoc block comments
on my functions, but this time I'm using factories in my code and missing
autocomplete on those objects. I've tried using those hints as below, but
with no luck. What am I missing?
 
/* This code is not real */
$DAOFactory = new DAOFactory();
$usrObj = $DAOFactory-getUserDAO(); //autocomplete ok
$usrObj-resetPW($usr, $newPw); // no autocomplete here
 
I've tryed using:
$DAOFactory = new DAOFactory();
$usrObj = $DAOFactory-getUserDAO(); //autocomplete ok
/* @var $usrObj UserDAO */
$usrObj-resetPW($usr, $newPw); // but still no autocomplete here
 
Tried also
/* @var UserDAO */
$usrObj-resetPW($usr, $newPw); // no luck either
 
 
Thanks for your help.
 
 
PS: I've sent a similar message to ZendStudioNeon mailing list.

Atenciosamente,


 http://www.softpartech.com.br/ www.softpartech.com.br


Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
[EMAIL PROTECTED]
Excelência em Softwares Financeiros

 


Re: [PHP] PHPDoc autocomplete hints

2008-02-26 Thread Bojan Tesanovic


In getUserDAO()  method you need to specify return type eg

/**
* @return UserDAO
*/
function getUserDAO(){
 ...

}


and UserDAO  class must have resetPW method, I guess it alredy has.


This works for me, I have Zend Studio 5.5.0


On Feb 26, 2008, at 2:21 PM, Thiago Pojda wrote:


Guys,

I'm new to this thing and I'm not sure if it's my IDE (ZendStudioNeon)
problem, or if I'm doing something wrong. I always use PHPDoc block  
comments
on my functions, but this time I'm using factories in my code and  
missing
autocomplete on those objects. I've tried using those hints as  
below, but

with no luck. What am I missing?

/* This code is not real */
$DAOFactory = new DAOFactory();
$usrObj = $DAOFactory-getUserDAO(); //autocomplete ok
$usrObj-resetPW($usr, $newPw); // no autocomplete here

I've tryed using:
$DAOFactory = new DAOFactory();
$usrObj = $DAOFactory-getUserDAO(); //autocomplete ok
/* @var $usrObj UserDAO */
$usrObj-resetPW($usr, $newPw); // but still no autocomplete here

Tried also
/* @var UserDAO */
$usrObj-resetPW($usr, $newPw); // no luck either


Thanks for your help.


PS: I've sent a similar message to ZendStudioNeon mailing list.

Atenciosamente,


 http://www.softpartech.com.br/ www.softpartech.com.br


Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
[EMAIL PROTECTED]
Excelência em Softwares Financeiros




Bojan Tesanovic
http://www.classicio.com/
http://www.real-estates-sale.com/





[PHP] phpdoc install trouble

2005-09-17 Thread James Benson
Im trying to setup the pear phpdocumentor class but running into many 
problems, i think ive nearly got all the include directories setup 
correct now, modified some paths etc, now when i get to the end of a 
compile via the command line it always says the followig with different 
files when differnt converters are used:-


Fatal error: Call to undefined function:  phpdocumentor_get_class() in 
/docs/www/phpDocumentor/Converters/HTML/Smarty/HTMLSmartyConverter.inc 
on line 1122




Also Tried with web interface but get the following two error messages:-

Parsing configuration file phpDocumentor.ini...
done
using experimental tokenizer Parser
File  Ignored
ERROR: nothing parsed

...

Parsing configuration file phpDocumentor.ini...
done
Directory '' not found



Using PHP4.4.0 Apache 1.3.33 - ubuntu 5 with tokenizer ext, my 
phpDocumentor.ini settings are as follows:-





Program_Root = /docs/www/FormGenie

;; uncomment this to set the path phpDocumentor looks in to find user files
userdir = user/

;; Use useconfig if you want to be able to run phpdoc with no 
command-line options (!!)
;; change the value of useconfig to an .ini file that is in users/ (like 
greg.ini)

;[_phpDocumentor_setting]
useconfig = demo




settings of demo.ini

target = /docs/www/FormGenie/docs


[Parse Data]
;; title of all the documentation
;; legal values: any string
title = FormGenie Documentation

;; parse files that start with a . like .bash_profile
;; legal values: true, false
hidden = false

;; show elements marked @access private in documentation by setting this 
to on

;; legal values: on, off
parseprivate = on

;; parse with javadoc-like description (first sentence is always the 
short description)

;; legal values: on, off
javadocdesc = off

;;target=/dev/null

;; add any custom @tags separated by commas here
;; legal values: any legal tagname separated by commas.
;customtags = mytag1,mytag2

;; what is the main package?
;; legal values: alphanumeric string plus - and _
defaultpackagename = FormGenie

;; output any parsing information?  set to on for cron jobs
;; legal values: on
;quiet = on

;; limit output to the specified packages, even if others are parsed
;; legal values: package names separated by commas
;packageoutput = package1,package2

;; comma-separated list of files to parse
;; legal values: paths separated by commas
;filename = /path/to/file1,/path/to/file2,fileincurrentdirectory
;;filename =


;; comma-separated list of directories to parse
;; legal values: directory paths separated by commas
;directory = /path1,/path2,.,..,subdirectory
directory = /docs/www/FormGenie


;; comma-separated list of files, directories or wildcards ? and * (any 
wildcard) to ignore

;; legal values: any wildcard strings separated by commas
;ignore = /path/to/ignore*,*list.php,myfile.php,subdirectory/
;;ignore = templates_c/,*HTML/default/*,spec/

;; comma-separated list of Converters to use in 
outputformat:Convertername:templatedirectory format
;; legal values: 
HTML:frames:default,HTML:frames:l0l33t,HTML:frames:phpdoc.de,HTML:frames:phphtmllib 

;; 
HTML:frames:phpedit,HTML:frames:DOM/default,HTML:frames:DOM/l0l33t,HTML:frames:DOM/phpdoc.de 

;; 
HTML:Smarty:default,HTML:Smarty:PHP,PDF:default:default,CHM:default:default,XML:DocBook:default 


output=HTML:frames:default,HTML:frames:l0l33t,HTML:frames:phpdoc.de,HTML:frames:phphtmllib,HTML:frames:DOM/default,HTML:frames:DOM/l0l33t,HTML:frames:DOM/phpdoc.de,HTML:frames:phpedit,HTML:Smarty:default,HTML:Smarty:HandS,HTML:Smarty:PHP,PDF:default:default,XML:DocBook/peardoc2:default,CHM:default:default




Thanks for any help,

James

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



[PHP] PHPdoc web interface

2004-02-28 Thread daniel
Has anyone tried out the new version ? I've never managed to make it work
without having to make ini files for each directory i want to document. I
tried just making my options in the form, but it doesnt work here is the
output

Parsing Files ...
PHP Version 4.3.1
phpDocumentor version 1.3.0RC2

Parsing configuration file phpDocumentor.ini...
done
using tokenizer Parser
ERROR: nothing parsed


I also like to make a introduction page and some comments and links to
other documentation, has anyone done this sought of thing ?

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



[PHP] phpdoc commenter

2004-01-11 Thread Shawn McKenzie
Has anyone seen a script or app that will parse PHP files and add phpdoc
comments in the PHP file when it encounters a function or class?

I know it won't be fool-proof, but it could at least add a block comment
with required parameters and ascertain the function arguments and return
value to be added in the block comment.

Shouldn't be a difficult script to write, but maybe there is a good solution
out there.

TIA
-Shawn

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



Re: [PHP] phpdoc commenter

2004-01-11 Thread Nelson Rodríguez-Peña Alarcón
Hi Shawn,

Shawn McKenzie wrote:
Has anyone seen a script or app that will parse PHP files and add phpdoc
comments in the PHP file when it encounters a function or class?
have you seen PhpEdit http://www.phpedit.net ? It's not that 
automatic, but it has an action that allows you to add documentation to 
a function/class. It shouldn't be difficult to extend it to parse a 
complete script I guess...

--

regards,


 Nelson Rodríguez-Peña A.
 Diseño y Desarrollo
 Web  Multimedia

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


Re: [PHP] phpdoc commenter

2004-01-11 Thread Shawn McKenzie
Thanks!  I used this a while back but didn't remember that functionality.  I
have downloaded.

Great, now I have 3 IDEs!

Maguma, because it has some cool features, it is the first good one that I
evaluated, and because Zend is very slow!
Zend, because of the profiler and because it is Zend.
PhpEdit, because of this.

-Shawn

Nelson Rodríguez-Peña Alarcón wrote in message
news:[EMAIL PROTECTED]
 Hi Shawn,

 Shawn McKenzie wrote:
  Has anyone seen a script or app that will parse PHP files and add phpdoc
  comments in the PHP file when it encounters a function or class?

 have you seen PhpEdit http://www.phpedit.net ? It's not that
 automatic, but it has an action that allows you to add documentation to
 a function/class. It shouldn't be difficult to extend it to parse a
 complete script I guess...

 -- 


 regards,

 
   Nelson Rodríguez-Peña A.
   Diseño y Desarrollo
   Web  Multimedia
 

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



Re: [PHP] PHPDoc?

2002-10-07 Thread Matt

I know of the following...

www.phpdoc.de - used by PEAR, scattered documentation
http://phpdocu.sourceforge.net - lots more documentation, hate the framed
output
http://www.ez.no/article/articlestatic/35/1/42/ - eZ phpdoc, from the people
who make the eZ CMS

I'm interested in hearing from anyone who uses these - how widely are they
used/supported, how buggy, how well do they follow JavaDoc?


Scott Houseman [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 www.phpdoc.de is one I know of.
 I'm not surewhat the current development activity is, but I think it's
still in beta.
 The front page states 'Last update: 2000/12/03' - so I don't know what's
happening there.

 Regards

 Scott

 On 10/1/2002 4:18 PM, Francis wrote:
  Is their any comparable tool/util whatever to automaticly create
  documentation from your PHP Code (like java's JavaDoc)?
 
 
 


 --
 ////
 // Scott Houseman //
 // Jam Warehouse http://www.jamwarehouse.com/ //
 // Smart Business Innovation  //
 // +27 21 4477440 / +27 82 4918021//
 ////




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




[PHP] PHPDoc?

2002-10-01 Thread Francis

Is their any comparable tool/util whatever to automaticly create
documentation from your PHP Code (like java's JavaDoc)?



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




Re: [PHP] PHPDoc?

2002-10-01 Thread Scott Houseman

www.phpdoc.de is one I know of.
I'm not surewhat the current development activity is, but I think it's still in beta.
The front page states 'Last update: 2000/12/03' - so I don't know what's happening 
there.

Regards

Scott

On 10/1/2002 4:18 PM, Francis wrote:
 Is their any comparable tool/util whatever to automaticly create
 documentation from your PHP Code (like java's JavaDoc)?
 
 
 


-- 
////
// Scott Houseman //
// Jam Warehouse http://www.jamwarehouse.com/ //
// Smart Business Innovation  //
// +27 21 4477440 / +27 82 4918021//
////


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




[PHP] phpdoc CHM 9th sample out

2002-09-04 Thread Gabor Hojtsy

Hi!

For those Windows users who are interested in a
useable help system, the 9th sample of our new CHM
edition is out at http://weblabor.hu/php-doc-chm

It includes a workaround for the most annoying IE6
bug we ever met (thanks to Brendan for the tips!),
and also simplifies skin switching.

For those who beta tested the sample, this is the
same file, no need to download it again.

Goba



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




[PHP] PHPDOC 2.3.5 released

2001-06-20 Thread Christian Calloway

Hi everyone,

I released a new version of PHPDoc, 2.3.5, and is a major update over 
previous releases. PHPDoc can now parse multiple class definitions in a 
single file. For anyone that doesnt know, PHPDoc is documenting tool, that 
converts PHP code to Java syntax, and then hands that result over Javadoc. 
What this means is, instead of trying to copy Javadoc's functionality, 
PHPDoc actually uses Javadoc for the creation of docs. This means all of 
Javadoc's power and options are available to use on our PHP code. And since 
PHPDoc's only job is to parse and convert PHP code, the program has an 
extremely small footprint (only 73kb). You can get it at 
http://www.callowayprints.com/phpdoc

Thanks everyone,

Christian
_
Get your FREE download of MSN Explorer at http://explorer.msn.com




Re: [PHP] PHPDoc and file with function only

2001-03-15 Thread Richard Lynch

I think PHPDoc is only for documenting classes...

-- 
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message - 
From: Remi Ricard [EMAIL PROTECTED]
Newsgroups: php.general
Sent: Tuesday, March 13, 2001 11:20 AM
Subject: [PHP] PHPDoc and file with function only


 Hi,
 
 I'm trying to document a file which include only function and it
 does not work
 can you help me on that.
 
 The file look like:
 /**
   * Small comments
  *
  * Bigger comments lkjadfhlkjgaljfdgag ;kajhdflhgdsbf
  * @module mod1
  * @modulegroup mod_group1
 */
 
 /**
  * Small comment for the function
 *
  * Bigger comment for the function kjhdlakhdlakjfhlakdhf
 * @param string first param
 * @return boolean A value to be returned
 */
 function tata($str) { return 1; }
 
 
 I'm able to document file which contains class.
 
 
 Remi Ricard
 [EMAIL PROTECTED]
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHPDoc and file with function only

2001-03-13 Thread Remi Ricard

Hi,

I'm trying to document a file which include only function and it
does not work
can you help me on that.

The file look like:
/**
  * Small comments
 *
 * Bigger comments lkjadfhlkjgaljfdgag ;kajhdflhgdsbf
 * @module mod1
 * @modulegroup mod_group1
*/

/**
 * Small comment for the function
*
 * Bigger comment for the function kjhdlakhdlakjfhlakdhf
* @param string first param
* @return boolean A value to be returned
*/
function tata($str) { return 1; }


I'm able to document file which contains class.


Remi Ricard
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]