public function registerCallback($path, $callback)
    {
        //Ensure the path is a string
        if (!is_string($path)) {
            throw new Exception('Path must be a string');
        }

        //Ensure that the callback is callable
        if (!is_callable($callback)) {
            throw new Exception('Callback must be callable');
        }

        //All tags and paths are lower cased, for consistency
        $path = strtolower($path);
        if (substr($path, -1, 1) !== '/') {
            $path .= '/';
        }

        //If this is the first callback for this path, initialise the variable
        if (!isset($this->callbacks[$path])) {
            $this->callback[$path] = array();
        }

        //Add the callback
        $this->callbacks[$path][] = $callback;

        return $this;
    }