public function getWidgetForPath($path)
    {
        $this->log->info('Getting widget for path: '.$path);
        $widget = null;
        if (!isset($this->paths[$path])) {
            // find the largest match
            $largest = 0;
            foreach ($this->paths as $pathReg => $widgetItem) {
                if (($match = strstr($path, $pathReg)) !== false && strpos($path, $pathReg) == 0) {
                    if (strlen($pathReg) > $largest) {
                        $largest = strlen($pathReg);
                        $widget = $widgetItem;
                    }
                }
            }
        } else {
            $widget = $this->paths[$path];
        }

        return $widget;
    }