case 'group.all': $response = Page::all(); break; case 'group.get': $response = Group::get(_::int('group')); break; case 'group.student': $response = Group::student(_::int('group'), _::int('student')); break; case 'group.notify': $response = Group::notify(_::int('group'), _::int('author'), _::str('header'), _::str('text')); break; case 'page.add': $response = Page::add(_::str('title'), _::raw('text'), _::int('author')); break; case 'page.all': $response = Page::all(); break; case 'page.get': $response = Page::get(_::int('id')); break; case 'page.edit': $response = Page::edit(_::int('id'), _::str('title'), _::raw('text')); break; /** @subsection Обработка ошибочного запроса */ /** @subsection Обработка ошибочного запроса */ default: Api::error(0, $method . ' : Неверный запрос к Api'); // Все прочие запросы игнорируются } Api::out($response);