add (alpha) support to namespace #15

wants to merge 33 commits into


None yet

4 participants

iannsp commented Apr 1, 2012

Add algorithm to support namespace documentation

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

@iannsp iannsp referenced this pull request Apr 1, 2012

Namespace Doc classes #9

alganet commented Apr 2, 2012

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 Apr 2, 2012

@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- nickl- commented on the diff Aug 29, 2012
+namespace Respect\Doc;
+class NameSpaceAnalizerTest extends \phpunit_framework_testcase
+ private $ns;
+ public function setUp()
+ {
+ $this->ns = new NameSpaceAnalizer();
+ }
+ public function tearDown()
+ {
+ $this->namespace = null;
+ }
+ public function testget()
+ {
+ $class = new MarkDown();
nickl- Aug 29, 2012 Respect member

Hey where's this guy going? Tie that mark down down... =)

augustohp Aug 29, 2012 Respect member

Yep, this should not be there...

nickl- commented Aug 29, 2012

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! =)

@nickl- nickl- closed this Aug 29, 2012

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 Aug 29, 2012

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

nickl- commented Aug 29, 2012

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment