epiphany icon indicating copy to clipboard operation
epiphany copied to clipboard

Namespaces / PEAR naming conventions

Open keeguon opened this issue 13 years ago • 1 comments

I'm using your EpiCurl class for a small project and I mainly use the Symfony ClassLoader these days to autoload all the class I need and I noticed that EpiCurl wasn't loaded because it wasn't using either namespaces or the PEAR naming conventions. I noticed it wasn't only EpiCurl which was suffering from this but the whole epiphany framework.

My proposal (I would be more than happy to help) is the following: add an Epiphany namespace in all your files or prepend "Epiphany_" to all of your classes. That way you could autoload all the framework using a ClassLoader of some sort (like the Symfony one) and would consequently allow to simplify the Epi class in some fashion.

The way I see is that using namespaces would be the best solution because it would completely remove the need for the Epi class and instead once all the classes are autoloaded using a class loader you would be able to call for the needed classes using the "use" keyword.

Again this is just a proposition maybe it's not how you envision your framework but I guess it would be a pretty damn good idea anyway.

keeguon avatar Jul 19 '11 12:07 keeguon

Keeguon, Thanks for the email. Adding in your feature requests is something I can definitely look into for version 2 of the framework. -- Jaisen

On Tue, Jul 19, 2011 at 5:53 AM, Keeguon < [email protected]>wrote:

I'm using your EpiCurl class for a small project and I mainly use the Symfony ClassLoader these days to autoload all the class I need and I noticed that EpiCurl wasn't loaded because it wasn't using either namespaces or the PEAR naming conventions. I noticed it wasn't only EpiCurl which was suffering from this but the whole epiphany framework.

My proposal (I would be more than happy to help) is the following: add an Epiphany namespace in all your files or prepend "Epiphany_" to all of your classes. That way you could autoload all the framework using a ClassLoader of some sort (like the Symfony one) and would consequently allow to simplify the Epi class in some fashion.

The way I see is that using namespaces would be the best solution because it would completely remove the need for the Epi class and instead once all the classes are autoloaded using a class loader you would be able to call for the needed classes using the "use" keyword.

Again this is just a proposition maybe it's not how you envision your framework but I guess it would be a pretty damn good idea anyway.

Reply to this email directly or view it on GitHub: https://github.com/jmathai/epiphany/issues/30

jmathai avatar Jul 19 '11 21:07 jmathai