public function getBreadCrumb() { if (self::$breadCrumb != null) { return self::$breadCrumb; } self::$breadCrumb = array(); $uri = $_SERVER['REQUEST_URI']; if (empty($uri)) { return array(); } $matchUri = $this->_getMatchUri($uri); $uri = str_replace("//", "/", str_replace(OPENBIZ_APP_INDEX_URL, '', $uri)); $pathArray = array(); // first find the exact uri match $this->fetchNodePath("[link]='{$uri}'", $pathArray); if (count($pathArray) > 0) { self::$breadCrumb = $pathArray; return $pathArray; } // then find partial match uri $this->fetchNodePath("[url_match] LIKE '%{$matchUri}%'", $pathArray); if (count($pathArray) > 0) { self::$breadCrumb = $pathArray; return $pathArray; } // then find partial match uri $this->fetchNodePath("[link] LIKE '%{$matchUri}%'", $pathArray); self::$breadCrumb = $pathArray; return $pathArray; }