Respect / Doc

Generates docs that rocks your socks off.
BSD 3-Clause "New" or "Revised" License
14 stars 0 forks source link

add (alpha) support to namespace #15

Closed iannsp closed 12 years ago

iannsp commented 12 years ago

Add algorithm to support namespace documentation

the interface is $doc = new Doc('Respect\Doc', Doc::DOCNS);

alganet commented 12 years ago

PR #15 is doing two things: It implements namespaces in the Doc project itself and also adds support to loading files to document namespaces.

I prefer an API without the mode parameter. If the user sets $doc = new Doc('Zend\'); we should imply that is a namespace (after all, it ends with a namespace separator). Same for $doc = new Doc('Zend_'); and the old fake-namespace standard. However, I'm in a middle of a flu, maybe my brain is tricking me, anyone sees any disadvantage on this approach? We also need some tests for this!

iannsp commented 12 years ago

@alganet, this approach is really better then use mode parameter. I don't think recognize '\' to NS and / to DIR, really!!!! Probably I'm blind or drunk(or both) ;)

Gonna fix it and apply a new PR.

nickl- commented 12 years ago

I see tests like @alganet requested,

I see some really some really crucial fixes. I see some interesting additions. I see this only now for the first time.

I see no reason not to commit this to the develop branch. Took a little persuasion but all done, thanx @iannsp I can't wait to have a look and see! =)

augustohp commented 12 years ago

Maybe pushing this to a branch called namespaces would be better, we can discuss that there with code and through commit messages.... what do you all think!?

alganet commented 12 years ago

Let's merge it! We can improve it later, we're all good at this =D

nickl- commented 12 years ago

Exactly, the patch also has general fixes that should definitely get onto track.

If we don't like something we change it, the question should really only be:

a) Is it working? No use have broken sh... stuff. b) Is it an improvement, change arguably is already an improvement =)

Lets keep the wheels rolling this was lying around for 5 months!!!! That's a lifetime for many most pieces of source.