예제 #1
0
 public function getBreadCrumb()
 {
     if (self::$m_BreadCrumb != null) {
         return self::$m_BreadCrumb;
     }
     self::$m_BreadCrumb = array();
     $uri = $_SERVER['REQUEST_URI'];
     if (empty($uri)) {
         return array();
     }
     $matchUri = $this->_getMatchUri($uri);
     $uri = str_replace(APP_INDEX, '', $uri);
     $pathArray = array();
     //global $g_BizSystem;
     //$currentView = $g_BizSystem->getCurrentViewName();
     //$this->fetchNodePath("[link]='$uri' OR [view]='$currentView'", $pathArray);
     // first find the exact uri match
     $this->fetchNodePath("[link]='{$uri}'", $pathArray);
     if (count($pathArray) > 0) {
         self::$m_BreadCrumb = $pathArray;
         return $pathArray;
     }
     // then find partial match uri
     $this->fetchNodePath("[link] LIKE '%{$matchUri}%'", $pathArray);
     self::$m_BreadCrumb = $pathArray;
     return $pathArray;
 }