public function addRoute($path, $cb)
{
$routeName = ltrim($path, '/');
if (isset($this->routes[$routeName])) {
Daemon::log(__METHOD__ . ': Route \'' . $path . '\' is already defined.');
return false;
}
$this->routes[$routeName] = $cb;
return true;
}