/**
* Register (map) a task to a method in the class.
*
* @param string $task The task.
* @param string $method The name of the method in the derived class to perform for this task.
*
* @return static A \JControllerLegacy object to support chaining.
*
* @since 3.0
*/
public function registerTask($task, $method)
{
if (\in_array(strtolower($method), $this->methods)) {
$this->taskMap[strtolower($task)] = $method;
}
return $this;
}