Re: cvs: pear /Text_Wiki/doc test_Text_Wiki.php

From: Date: Mon, 27 Feb 2006 16:24:31 +0000
Subject: Re: cvs: pear /Text_Wiki/doc test_Text_Wiki.php
References: 1 2  Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-38689@lists.php.net to get a copy of this message
On 2/27/06, bertrand Gugger <bertrand@toggg.com> wrote: > Del Elson wrote: > > delatbabel Mon Feb 27 09:19:50 2006 UTC > > > > Modified files: > > /pear/Text_Wiki/doc test_Text_Wiki.php > > Log: > > Fix for new parameter order in singleton. > Thanks Del ! > > However, your constructor still does not work. > If I do, with a $parser not 'Default' > $wiki = & new Text_Wiki(null, $parser); > instead of: > $wiki = & Text_Wiki::singleton(null, $parser); > Then it produces a parser missing some rules (the ones from Default). > I suggest that this should not be the case. A parser chosen in a constructor should not be relying on Default rules being in the "include path", especially parsers that are packages as their own package. If your parser is relying on the default rules then it should have classes in it which extend the default rules. > Also, as said, for esthetic reasons only, I would have like to have the > parameters reversed in constructor as: > Text_Wiki($parser = 'Default', $rules = null) > it's possible just by analyzing count and types of arguments. Except this is very confusing. I vote a big -1 on this. Allowing constructor params (or params to any method) in whatever order you want is confusing and should not be supported. We're stuck with what Text_Wiki does since it's stable. Please stop complaining and just deal with it being $rules, $parser. We can change it for Text_Markup if it ever comes. -- Justin Patrin

« previous php.pear.cvs (#38689) next »