some basic functions
authorx2000coic <x2000coic>
Thu, 25 Nov 2004 22:00:39 +0000 (22:00 +0000)
committerx2000coic <x2000coic>
Thu, 25 Nov 2004 22:00:39 +0000 (22:00 +0000)
include/exalead/exalead.class.php

index 4e19185..dfcd6dc 100644 (file)
@@ -44,6 +44,19 @@ class ExaleadKeyword{
     $exclude_href = "";
     $reset_href = "";  
   }
+  function is_normal(){
+    return empty($this->reset_href);
+  }
+
+  function is_refined(){
+    return ( (!empty($this->reset_href)) && ($this->count > 0) );
+  }
+  
+  function is_excluded(){
+    return ( (!empty($this->reset_href)) && ($this->count == 0) );
+  }
 }
 
 class ExaleadGroup{
@@ -124,6 +137,18 @@ class ExaleadCategory{
    $this->gcount = "";
   }
   
+  function is_normal(){
+    return empty($this->reset_href);
+  }
+
+  function is_refined(){
+    return ( (!empty($this->reset_href)) && ($this->count > 0) );
+  }
+  
+  function is_excluded(){
+    return ( (!empty($this->reset_href)) && ($this->count == 0) );
+  }
+
 }
 
 class ExaleadHit{