public function detectId()
    {
        // If there is an id, it will be the last number
        if (preg_match('#\d+$#', $this->path, $matches)) {
            return $matches[0];
        }

        // .. or the route will be an action preceeded by an id
        $pattern = '#(\d+)/('.implode('|', $this->actions).')$#i';
        if (preg_match($pattern, $this->path, $matches)) {
            return $matches[1];
        }

        // There's no id
        return false;
    }