- /**
- * Handler method
- *
- * @param array $argarray is ignored since it's now passed in in prepare()
- *
- * @return void
- */
- function handle($argarray=null)
- {
- switch ($_SERVER['REQUEST_METHOD']) {
- case 'GET':
- case 'HEAD':
- $this->showMembership();
- break;
- case 'DELETE':
- $this->deleteMembership();
- break;
- default:
- // TRANS: Client exception thrown when using an unsupported HTTP method.
- throw new ClientException(_('HTTP method not supported.'), 405);
- break;
- }
- return;
+ protected function handleGet() {
+ return $this->showMembership();
+ }
+
+ protected function handleDelete() {
+ return $this->deleteMembership();