syntaxe POO (visibilite) et maj indentation
[mw_sourceml] / app / data / modules / sql / sml_data_sources_cache_db.php
index 2497e58..9b972a7 100644 (file)
@@ -2,7 +2,7 @@
 
   class sml_data_sources_cache_db extends mw_data{
 
-    function source_cache_db(){
+    public function source_cache_db(){
       $sgbd = $this->sgbd();
       $cache = array();
       try{
         while($v_rst = $sgbd->fetch_assoc($rst)) $cache[$v_rst["id"]] = $v_rst;
         $sgbd->free_result($rst);
       }
-      catch(Exception $e) { $cache = false; }
+      catch(Exception $e){
+        $cache = false;
+      }
       return $cache;
     }
 
-    function source_cache_infos_db($url){
+    public function source_cache_infos_db($url){
       $sgbd = $this->sgbd();
       $cache_infos = array();
       try{
         if($v_rst = $sgbd->fetch_assoc($rst)) $cache_infos = $v_rst;
         $sgbd->free_result($rst);
       }
-      catch(Exception $e) { $cache_infos = false; }
+      catch(Exception $e){
+        $cache_infos = false;
+      }
       return $cache_infos;
     }
 
-    function add_source_cache_db($url, $cache_index){
+    public function add_source_cache_db($url, $cache_index){
       $sgbd = $this->sgbd();
       try{
         $sql =
         .")";
         $sgbd->query($sql);
       }
-      catch(Exception $e) { return false; }
+      catch(Exception $e){
+        return false;
+      }
       return true;
     }
 
-    function del_source_cache_db($id_cache_data){
+    public function del_source_cache_db($id_cache_data){
       $env = $this->env();
       $sgbd = $this->sgbd();
       try{
         $sql = "DELETE FROM #--sml_source_cache WHERE id=".$this->eq($id_cache_data);
         $sgbd->query($sql);
       }
-      catch(Exception $e) { return false; }
+      catch(Exception $e){
+        return false;
+      }
       return true;
     }
 
   }
-
-?>
\ No newline at end of file