summaryrefslogtreecommitdiffstats
path: root/src/Config/Controls.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Config/Controls.php')
-rw-r--r--src/Config/Controls.php31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/Config/Controls.php b/src/Config/Controls.php
index 8eba624..7147d4d 100644
--- a/src/Config/Controls.php
+++ b/src/Config/Controls.php
@@ -34,6 +34,13 @@ trait Controls
protected $delimiter = ',';
/**
+ * the line ending
+ *
+ * @var string
+ */
+ protected $lineEnding = "\n";
+
+ /**
* the field enclosure character (one character only)
*
* @var string
@@ -91,6 +98,30 @@ trait Controls
}
/**
+ * set the line ending
+ *
+ * @param string $lineEnding
+ *
+ * @return $this
+ */
+ public function setLineEnding($lineEnding = "\n")
+ {
+ $this->lineEnding = $lineEnding;
+
+ return $this;
+ }
+
+ /**
+ * return the current line ending
+ *
+ * @return string
+ */
+ public function getLineEnding()
+ {
+ return $this->lineEnding;
+ }
+
+ /**
* detect the actual number of row according to a delimiter
*
* @param string $delimiter a CSV delimiter