Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Prefix for classes #1

Open
makasim opened this Issue · 6 comments

5 participants

Maksim Kotlyar Felix Bruns Matt Humphrey Patrick Galbraith Thomas Edvalson
Maksim Kotlyar

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?

Felix Bruns
Owner

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

Matt Humphrey

You could just use namespaces.

Felix Bruns
Owner

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

Matt Humphrey

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

Patrick Galbraith

I created a fork that is namespaced with LastFM_ ie LastFM_Artist etc...
https://github.com/patrickgalbraith/php-last.fm-api

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

Thomas Edvalson

I have a PSR-0 compliant namedspaced fork here for those interested:
https://github.com/Cruel/php-last.fm-api

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
Something went wrong with that request. Please try again.