PHPdoc CVS repository
| From: | Florian Clever | Date: | Wed, 05 Dec 2001 00:00:24 +0000 |
| Subject: | PHPdoc CVS repository | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-572@lists.php.net to get a copy of this message | ||
Joshua,
thanks for the pointers. I was able to make PHPdoc work for me on Windows.
I think all the code should also work on Unix.
I am attaching the patch.
Basically, I got ride of the PATH_DELIMITER and statically set it
to "/". Everywhere in the code where treating paths I used
strtr($path, "\\", "/"). And then it works.
I think this makes more sense, because on Windows you can also
use "/". So like this the code will work even if people type in
"/" on windows (Like I originally did).
The patch also includes basic support for an @name tag.
Great Tool! I would love to help out more (I would have some ideas right
away).
Florian
> > -----Original Message-----
> > From: Joshua Eichorn [mailto:jeichorn@JoshuaEichorn.com]
> > Sent: Wednesday, November 28, 2001 3:52 PM
> > To: Florian Clever
> > Cc: pear-general@lists.php.net
> > Subject: Re: [PEAR] PHPdoc CVS repository
> >
> >
> > New files are created in Render.inc
> > the name of the file is set with the following command:
> > $this->page['name'] = "_" . $data->getName();
> >
> > Now the $data object is just a container, that i use to pass
> data around
> > no logic in that so i looked up what set the name property in
> > this container.
> >
> > That takes us to Parser.inc line 143
> >
> > I mess with the file name to remove a set amount of path from the file
> > name. When creating names for precedural files i try to create names
> > that are useful, and are unique. To keep them unique i use there
> > relative path. Im asuming im messing that up do to issues with windows
> > using
> > a different path seperator.
> >
> > Also on a side note it would be possible to add a @name tag to
> the first
> > docblock on a procedural page, and use that as the page, you would just
> > need to detect this in Render.inc and use that as the value instead of
> > $data->getName();
> >
> >
> > You might also find this helpful
> > General overview of phpdoc operation
> >
> > phpdoc.inc is where the work happens, user input is parsed, new objects
> > are created and such.
> >
> > user input is parsed by the Io class, a list of files to parse is
> > created and they are fed into the parser object
> > one by one.
> >
> > The parser fires events to Render class, the following events can
> > be fired:
> > docblock
> > page
> > class
> > define
> > function
> > var
> >
> >
> > The render class uses the data object passed to it to create new
> > template pages or to register elements into the templates.
> >
> > The templates are then parsed and output files are created.
> >
> > -joshua eichorn
> >
> > Florian Clever wrote:
> >
> > >Joshua,
> > >
> > >looks better already. Can you point me briefly to the
> locations where you
> > >tried to tweak. Than I can try to look at it and maybe fix it.
> > >
> > >BTW: Anybody out there claiming commercial support is better than
> > >OpenSource, where you can talk with the developers directly and
> > attempt to
> > >fix it yourself?
> > >
> > >Florian
> > >
> > >PS: I think this definetly has some great potential.
> > >
> > >>-----Original Message-----
> > >>From: Joshua Eichorn [mailto:jeichorn@JoshuaEichorn.com]
> > >>Sent: Wednesday, November 28, 2001 2:45 PM
> > >>To: Florian Clever
> > >>Cc: pear-general@lists.php.net
> > >>Subject: Re: [PEAR] PHPdoc CVS repository
> > >>
> > >>
> > >>Looks to be a windows only problem, i was using the unix path
> seperator
> > >>instead of the constant which i set
> > >>to the correct seperator for the os. I've updated the
> snapshot with the
> > >>fix, hopefully this is the problem, otherwise
> > >>i won't get it fixed for awhile since i have a windows box
> setup here at
> > >>work.
> > >>-joshua eichorn
> > >>Florian Clever wrote:
> > >>
> > >>>Thanks Joshua,
> > >>>
> > >>>I downloaded your snapshot. It looks better (for example it does
> > >>>
> > >>not through
> > >>
> > >>>this array_map error anymore), however there seems to be an
> > >>>
> > >>issue in regards
> > >>
> > >>>to filenames.
> > >>>I am running on Windows 2000. All non-class files (thus all the
> > >>>
> > >>procedural
> > >>
> > >>>files) get the name "_". So basically it writes all data into a
> > >>>
> > >>file called
> > >>
> > >>>"_" over and over again, everytime essentially wiping out the
> > >>>
> > >>previous file.
> > >>
> > >>>This did not happen with the 0.2.5 release.
> > >>>It might be just a windows issue, because if you enter paths
> > with "\" it
> > >>>outputs them as "\\".
> > >>>I did not have time yet too look at the source code, but maybe
> > >>>
> > >>you already
> > >>
> > >>>know what I am talking about.
> > >>>
> > >>>Florian
> > >>>
> > >>>>-----Original Message-----
> > >>>>From: Joshua Eichorn [mailto:jeichorn@JoshuaEichorn.com]
> > >>>>Sent: Wednesday, November 28, 2001 12:52 PM
> > >>>>To: Florian Clever
> > >>>>Cc: pear-general@lists.php.net
> > >>>>Subject: Re: [PEAR] PHPdoc CVS repository
> > >>>>
> > >>>>
> > >>>>Florian,
> > >>>> Glad i could help you out. Hopefully this christmas i'll write a
> > >>>>new version using the new php extension for doing the parsing.
> > >>>>You should be able to simple put a docblock at the top of a
> > page, and as
> > >>>>long as the next documentable element is also documented
> > >>>>then is will use the first one as a page summary. For example:
> > >>>>
> > >>>><?php
> > >>>>/**
> > >>>>* A page containing all of my constants
> > >>>>*/
> > >>>>
> > >>>>/**
> > >>>>* A constant
> > >>>>*/
> > >>>>define("test","test");
> > >>>>?>
> > >>>>
> > >>>>However there seems to be a bug in the code and this isn't
> > working. It
> > >>>>seems I didn't have that section in the template.
> > >>>>I've fixed the bug and put a new snapshot up at
> > >>>>
> > >>>http://developer.phpdoc.org
> > >>>-joshua eichorn
> > >>>
> > >>>Florian Clever wrote:
> > >>>
> > >>>>Joshua,
> > >>>>
> > >>>>thanks for the link. It works pretty well.
> > >>>>Is it possible to get it to output somekind of general file
> > >>>>
> > >>summary at the
> > >>
> > >>>>top for procedural files?
> > >>>>Just below Page:/root/filename.
> > >>>>Similar to the brief description displayed for classes just
> below the
> > >>>>classname.
> > >>>>I guess you could also call it a file @abstract.
> > >>>>
> > >>>>Florian
> > >>>>
> > >>>>>-----Original Message-----
> > >>>>>From: Joshua Eichorn [mailto:jeichorn@joshuaeichorn.com]
> > >>>>>Sent: Tuesday, November 27, 2001 6:10 PM
> > >>>>>To: Florian Clever
> > >>>>>Cc: pear-general@lists.php.net
> > >>>>>Subject: Re: [PEAR] PHPdoc CVS repository
> > >>>>>
> > >>>>>
> > >>>>>If you want to work on phpdoc check the new php2xml phpdoc ext that
> > >>>>>produces xml of your php code using the zend engine.
> > >>>>>also if you just need some documentation now and dont want
> to work on
> > >>>>>lots of code, you might want to look at some of the other
> > >>>>>phpdoc implementations out there. For example i got a version at
> > >>>>>http://phpdoc.org
> > >>>>>
> > >>>>>-joshua eichorn
> > >>>>>
> > >>>>>Florian Clever wrote:
> > >>>>>
> > >>>>>>I am currently using the PHPdoc 1.0beta and running into a
> > >>>>>>
> > >>few problems
> > >>
> > >>>>>>which I am looking into fixing.
> > >>>>>>I would like to check against the current PHPdoc CVS version to
> > >>>>>>
> > >>>>>see if some
> > >>>>>
> > >>>>>>of that is already fixed.
> > >>>>>>However I am unable to find the CVS repository for PHPdoc.
> > >>>>>>www.phpdoc.de states it should be at cvs.php.net/php4/pear/phpdoc.
> > >>>>>>However that directory seems to be empty.
> > >>>>>>
> > >>>>>>Anybody who could shine some light on this.
> > >>>>>>thanks a lot,
> > >>>>>>Flori
> > >>>>>>
> > >>>>>>
> > >>>
> > >>>
> > >>
> > >>
> > >
> >
> >
> >