diff --git a/composer.json b/composer.json index 81d3d5e..8fa16c8 100644 --- a/composer.json +++ b/composer.json @@ -17,8 +17,6 @@ "ext-curl": "*" }, "autoload": { - "classmap": { - "Eyeem": "lib/" - } + "classmap": ["lib/"] } } \ No newline at end of file diff --git a/lib/Eyeem.php b/lib/Eyeem.php index 7c0072c..70f69e9 100644 --- a/lib/Eyeem.php +++ b/lib/Eyeem.php @@ -18,23 +18,7 @@ class Eyeem protected $_ressources = array( 'user', 'album', 'photo', 'comment', 'app' ); - - public static function autoload() - { - spl_autoload_register(array('self', 'loader')); - } - - public static function loader($className) - { - if (strpos($className, 'Eyeem') === 0) { - $filename = __DIR__ . '/' . str_replace('_', '/', $className) . '.php'; - if (file_exists($filename)) { - require_once $filename; - return true; - } - } - } - + public function getApiUrl($endpoint) { $url = $this->baseUrl . $endpoint;