Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Prefix for classes #1

makasim opened this Issue Oct 23, 2009 · 6 comments


None yet
5 participants

makasim commented Oct 23, 2009

It would be better if all classes in the library have prefix like lfCaller or like PEAR Services_LastFm_Caller.
In this way we'll avoid a lot of troubles with class names conflicts.

What do you think?


fxb commented Oct 23, 2009

Yeah, you're right. I also thought of that, but never changed it. I think I'll go with "LastfmCaller", "LastfmAlbum", etc.

You could just use namespaces.


fxb commented Jan 25, 2011

true. don't want to restrict it to PHP >= 5.3 though.

Yeh, agreed. Maybe include an example of how to use with namespaces.

I created a fork that is namespaced with LastFM_ ie LastFM_Artist etc...

I also added the Chart api and changed the __autoload function to use spl_autoload_register() to avoid conflicts.

Cruel commented Sep 26, 2013

I have a PSR-0 compliant namedspaced fork here for those interested:

It also has a composer.json for easy installation and autoloading in many workspaces.

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