private function validateRoute($logReference)
    {
        $valid = true;

        if (empty($this->name)) {
            if ($logReference) $logReference->error('Route does not specify a name. Path(' . $this->path . ') Class(' . $this->class . ')');
            $valid = false;
        }

        if (empty($this->path)) {
            if ($logReference) $logReference->error('Route does not specify a path. Name(' . $this->name . ') Class(' . $this->class . ')');
            $valid = false;
        } else {
            if ($this->path != '/' && $this->path[0] != '/') {
                if ($logReference) $logReference->error('Path ' . $this->path . ' must start with a forward slash. eg. /testing');
                $valid = false;
            }

            if ($this->path[mb_strlen($this->path) - 1] == '/') {
                $this->path = mb_substr($this->path, 0, mb_strlen($this->path) - 1);
            }
        }

        if (empty($this->class)) {
            if ($logReference) $logReference->error('Route does not specify a class. Name(' . $this->name . ') Path(' . $this->path . ')');
            $valid = false;
        }

        $this->validRoute = $valid;
    }