[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 13/46: Noalyss_CSV : add setter and getter
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 13/46: Noalyss_CSV : add setter and getter |
Date: |
Mon, 4 May 2020 13:38:45 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 353bacaf37e19ece9335a4e8354c1100b1df0c75
Author: Dany De Bontridder <address@hidden>
AuthorDate: Sat Feb 22 11:14:45 2020 +0100
Noalyss_CSV : add setter and getter
---
include/lib/noalyss_csv.class.php | 116 ++++++++++++++++++++++++++++++++++++--
1 file changed, 111 insertions(+), 5 deletions(-)
diff --git a/include/lib/noalyss_csv.class.php
b/include/lib/noalyss_csv.class.php
index 4eefce8..6694034 100644
--- a/include/lib/noalyss_csv.class.php
+++ b/include/lib/noalyss_csv.class.php
@@ -58,7 +58,7 @@ class Noalyss_Csv
* Correct the name of the file , remove forbidden character and
* add extension and date
*/
- private function correct_name()
+ protected function correct_name()
{
if (trim(strlen($this->filename))==0) {
record_log('CSV->correct_name filename is empty');
@@ -157,7 +157,7 @@ class Noalyss_Csv
/**
* clean the row
*/
- private function clean()
+ protected function clean()
{
$this->element=array();
$this->size=0;
@@ -166,7 +166,7 @@ class Noalyss_Csv
* format the number for the CSV export
* @param $p_number number
*/
- private function nb($p_number)
+ protected function nb($p_number)
{
$p_number=trim($p_number);
if ($p_number=="") {return $p_number;}
@@ -177,12 +177,118 @@ class Noalyss_Csv
}
return $r;
}
- private function encode($str)
+ protected function encode($str)
{
if ($this->encoding=="utf8") return $str;
if ($this->encoding=="latin1") return utf8_decode ($str);
throw new Exception(_("Encodage invalide"));
}
-
+ /**
+ * @return mixed
+ */
+ public function get_filename()
+ {
+ return $this->filename;
+ return $this;
+ }
+
+ /**
+ * @param mixed $filename
+ */
+ public function set_filename($filename)
+ {
+ $this->filename = $filename;
+ return $this;
+ }
+
+ /**
+ * @return array
+ */
+ public function get_element()
+ {
+ return $this->element;
+ return $this;
+ }
+
+ /**
+ * @param array $element
+ */
+ public function set_element($element)
+ {
+ $this->element = $element;
+ return $this;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function get_sep_field()
+ {
+ return $this->sep_field;
+ return $this;
+ }
+
+ /**
+ * @param mixed $sep_field
+ */
+ public function set_sep_field($sep_field)
+ {
+ $this->sep_field = $sep_field;
+ return $this;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function get_sep_dec()
+ {
+ return $this->sep_dec;
+ return $this;
+ }
+
+ /**
+ * @param mixed $sep_dec
+ */
+ public function set_sep_dec($sep_dec)
+ {
+ $this->sep_dec = $sep_dec;
+ return $this;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function get_encoding()
+ {
+ return $this->encoding;
+ return $this;
+ }
+
+ /**
+ * @param mixed $encoding
+ */
+ public function set_encoding($encoding)
+ {
+ $this->encoding = $encoding;
+ return $this;
+ }
+
+ /**
+ * @return int
+ */
+ public function get_size()
+ {
+ return $this->size;
+ return $this;
+ }
+
+ /**
+ * @param int $size
+ */
+ public function set_size($size)
+ {
+ $this->size = $size;
+ return $this;
+ }
}
- [Noalyss-commit] [noalyss] 05/46: Documentation, (continued)
- [Noalyss-commit] [noalyss] 05/46: Documentation, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 02/46: Bug solde is rounded and doesn't have decimal, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 03/46: Test Acc_Account, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 06/46: Documentation, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 12/46: Minimum version : PHP 7.0 and PostgreSQL 9.5, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 07/46: phpunit : use plain text for restoring test database, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 09/46: search : add placeholder, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 10/46: Bug : customer.inc.php with http_input::request Correct : Contact.inc.php remove direct use of $_GET, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 11/46: New : Icon_Action::icon_onoff : display on or off, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 08/46: Bug : filter_list does not filter simple list, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 13/46: Noalyss_CSV : add setter and getter,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 16/46: remove blank line, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 18/46: Task #1694: Opération FIN: opération liée - code fiche mais pas nom, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 19/46: Task #0001704: Faciliter l'ajout de plusieurs lignes, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 23/46: Output_Html_Tab : cosmetic, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 24/46: Create test folder for phpunit, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 25/46: Task #0001704: Faciliter l'ajout de plusieurs lignes Fichier oublié html_input_noalyss.class.php, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 15/46: replace $_GET by httpInput, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 30/46: Task #0001793: Installation mot de passe Password cannot be empty, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 14/46: Task #0001699: Affichage PDF balance - totaux niveaux, etc'., Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 20/46: Cosmetic : Opération prédéfinie, modèle, Dany De Bontridder, 2020/05/04