Welcome Guest, Not a member yet? Register   Sign In
PHP Tokens Parsing help
#1

[eluser]James Pax[/eluser]
Hi there,

I know 2nd thread today, but doubts are annhiliating me today Smile


I'm building a special plug-and-play "phpdoc" style app for CI, as I need a more dynamic and interactive documenter for my projects.


The problem is that the documentation for the php tokeniser is a bit confusing,

I made a parser but changed it a million times and got loads of weird outputs! lol!

I followed the original docs (PHP Tokenizer CLASS,PHP TOKEN List);

Code:
public function extinguish($fire)
{

    #source

}

I would be happy if I just knew how to extract a class method's body, source and line number.

If anybody has a link to some deeper documentation, that would be ùber-awesome!!!!

James
#2

[eluser]James Pax[/eluser]
please somebody pop up... I'm going crazy Smile
#3

[eluser]m4rw3r[/eluser]
Regexes could maybe be good for extracting the contents of a class.
And the reflection API could be a good place to look at if you want to check properties, methods, arguments, etc. (Reflection API, only PHP 5).
I would also like to have another documenter than Doxygen (it makes some errors), which I use for the moment, so I can maybe help you (quite busy, but I hope I can help a little).
#4

[eluser]James Pax[/eluser]
yes! thank you m4rw3r!

Sometimes google doesn't help if you don't know the right keywords to put in Tongue

This Reflection API is awesome! Just what I need and even better than the PHP Tokenizer Class!!

You rock! Big Grin

Anyways, I would be happy to have hand or two, Smile as my knowledge isn't superb. Thanks again!
#5

[eluser]m4rw3r[/eluser]
I think doxygen is good for documenting my code for developers (internal docs), but if I want something more customizable, doxygen isn't up for the job. So I will gladly help you with building a customizable PHPdoc app!




Theme © iAndrew 2016 - Forum software by © MyBB