git.cweiske.de
/
ouya-imagestore.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
api/playlists and image resizing + delivery
[ouya-imagestore.git]
/
src
/
imagestore
/
Controller
/
Api.php
1
<?php
2
namespace imagestore;
3
4
class Controller_Api
5
{
6
public function handle($uri)
7
{
8
if (substr($uri, 0, 3) != 'v1/') {
9
$this->error(404, 'Only API v1 supported');
10
}
11
12
$actionName = substr($uri, 3);
13
$class = 'imagestore\Controller_Api_' . ucfirst($actionName);
14
15
$action = new $class();
16
$action->handle();
17
}
18
}
19
?>