/**
* For initializing members of the class.
*
- * @param array $argarray misc. arguments
+ * @param array $args misc. arguments
*
* @return boolean true
*/
- function prepare($argarray)
+ protected function prepare(array $args=array())
{
- parent::prepare($argarray);
+ parent::prepare($args);
$profileId = $this->trimmed('profile');
$noticeId = $this->trimmed('notice');
/**
* Handler method
*
- * @param array $argarray is ignored since it's now passed in in prepare()
- *
* @return void
*/
- function handle($argarray=null)
+ protected function handle()
{
- parent::handle($argarray);
+ parent::handle();
switch ($_SERVER['REQUEST_METHOD']) {
- case GET:
- case HEAD:
+ case 'GET':
+ case 'HEAD':
$this->showFave();
break;
- case DELETE:
+ case 'DELETE':
$this->deleteFave();
break;
default:
// TRANS: Client exception thrown using an unsupported HTTP method.
- throw new ClientException(_('HTTP method not supported.'),
- 405);
+ throw new ClientException(_('HTTP method not supported.'), 405);
}
return true;
}
*
* @return boolean is read only action?
*/
- function isReadOnly($args)
+ function isReadOnly(array $args=array())
{
if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
$_SERVER['REQUEST_METHOD'] == 'HEAD') {