On Thu, May 28, 2009 at 05:11, Moacir de Oliveira
<moacirdeoliveira....@gmail.com> wrote:
> Example: If you have a new set of formats for rendering Docbook: The
> Definitive Guide 5, you will have to paste the files in a folder with the
> name of your package (TDG5) and paste in the packages directory.

I shouldn't have to copy the files into the PhD installation directory..
Could you come up with some sort of mechanism to specify the directory
the package is in?

Although.. If if we manage to split PhD into "core" and "packages"
then we could do:
$ pear install doc.php.net/phd-core
$ pear install my/local/package.xml

Which would then install my custom package into the phd/packages directory..


> abstract class PhDFormatFactory {
>     abstract public function createXhtmlFormat();
>     abstract public function createBigXhtmlFormat();
>     abstract public function createPDFFormat();
>     abstract public function createManpageFormat();
>     abstract public function createPHPFormat();

This feels a bit dangerous.
What if we add a new format in later versions of PhD? That would break
_all_ existing packages because they would get "Class foobar contains
1 abstract method and must therefore be declared abstract or implement
the remaining methods (PhDFormatFactory::createNewFormat)".

Maybe simply have the class abstract, but implementing dummy methods
(trigger_error("This format is not supported by this package",
E_USER_ERROR)) would solve it?

-Hannes

Reply via email to