Re: Class and interface location

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Larry,

I suggested the docblock tag because it seemed you didn't want to mandate
that plugins that extend other plugins be forced to include the interface in
an actual PHP implements clause. Duplicating the implements clause doesn't
cause any problems for PHP as you said, so that's one route.

Advantages: Validated at runtime by the PHP compiler when the plugin is
loaded.
Disadvantages: If they forget to add the implements, their plugin won't be
loaded.

Then there's the docblock tag idea.

Advantages: Easy to grab using grep.
Disadvantages: If they forget to add the tag, their plugin won't be loaded.

Someone mentioned creating a manifest file. If the plugins require any other
configuration, this is a great place for it.

Advantages: Easy to process.
Disadvantages: If they forget to add an interface, their plugin won't
receive its events but it will be "loaded" (not the class but the manifest).

No matter which method you choose, you can make the plugin developer's life
easier by writing a small script to validate the plugin and report which
events it will receive.

David

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux