瀏覽代碼

Distinguir libreria de parser de bruto a limpio. Devolver el array en caso de que no se borren indices

Nermosis 3 年之前
父節點
當前提交
9f588895b7

application/libraries/ParserDatabase.php → application/libraries/ParserDatabaseBruto.php 查看文件

1
 <?php
1
 <?php
2
 defined('BASEPATH') or exit('No direct script access allowed');
2
 defined('BASEPATH') or exit('No direct script access allowed');
3
 
3
 
4
-class ParserDatabase
4
+class ParserDatabaseBruto
5
 {
5
 {
6
     protected $idLicitacion = 0;
6
     protected $idLicitacion = 0;
7
     protected $fechaInicioParser = "";
7
     protected $fechaInicioParser = "";
8
+    protected $CI;
8
 
9
 
9
     public function __construct()
10
     public function __construct()
10
     {
11
     {

+ 4 - 2
application/libraries/ParserFile.php 查看文件

14
     {
14
     {
15
         $this->CI = &get_instance();
15
         $this->CI = &get_instance();
16
         $this->CI->load->helper('file');
16
         $this->CI->load->helper('file');
17
-        $this->CI->load->library('parserdatabase');
17
+        $this->CI->load->library('parserdatabasebruto');
18
     }
18
     }
19
 
19
 
20
     public function index($rutaDiariaDownloader, $fechaInicioParser)
20
     public function index($rutaDiariaDownloader, $fechaInicioParser)
70
             file_put_contents($this->rutaDiaria . "/text_" . $filename . ".txt", $str);
70
             file_put_contents($this->rutaDiaria . "/text_" . $filename . ".txt", $str);
71
         }
71
         }
72
 
72
 
73
-        $this->CI->parserdatabase->setDatosParser($resultEntries, $fechaInicioParser);
73
+        $this->CI->parserdatabasebruto->setDatosParser($resultEntries, $fechaInicioParser);
74
 
74
 
75
         return;
75
         return;
76
     }
76
     }
582
 
582
 
583
         if ($valuesTotales == $valuesVacios) {
583
         if ($valuesTotales == $valuesVacios) {
584
             $this->array_remove_empty($arrayCheck);
584
             $this->array_remove_empty($arrayCheck);
585
+        } else {
586
+            return $arrayCheck;
585
         }
587
         }
586
     }
588
     }
587
 
589
 

+ 37 - 0
application/libraries/Parserdatabaselimpio.php 查看文件

1
+<?php
2
+defined('BASEPATH') or exit('No direct script access allowed');
3
+
4
+/**
5
+ *
6
+ * Libraries Parserdatabaselimpio
7
+ *
8
+ * This Libraries for ...
9
+ *
10
+ * @package        CodeIgniter
11
+ * @category    Libraries
12
+ * @author    Setiawan Jodi <jodisetiawan@fisip-untirta.ac.id>
13
+ * @link      https://github.com/setdjod/myci-extension/
14
+ * @param     ...
15
+ * @return    ...
16
+ *
17
+ */
18
+
19
+class Parserdatabaselimpio
20
+{
21
+
22
+    protected $CI;
23
+
24
+    public function __construct()
25
+    {
26
+        $this->CI = &get_instance();
27
+    }
28
+
29
+    public function index()
30
+    {
31
+
32
+    }
33
+
34
+}
35
+
36
+/* End of file Parserdatabaselimpio.php */
37
+/* Location: ./application/libraries/Parserdatabaselimpio.php */