public function api()
{
$cmd = $this->param("cmd", false);
$mediapath = trim($this->module("auth")->getGroupSetting("media.path", '/'), '/');
$this->root = rtrim($this->app->path("site:{$mediapath}"), '/');
if (file_exists($this->root) && in_array($cmd, get_class_methods($this))) {
return $this->{$cmd}();
}
return false;
}