Exemplo n.º 1
0
 /**
  * open a csv file to read
  *
  * @param  string|resource $file filename or stream resource, default = null
  * @return CsvReader
  */
 public function open($file = null)
 {
     parent::open($file);
     $this->detectEncoding();
     $this->transcoder = new Transcoder($this->detectedEncoding);
     return $this;
 }
Exemplo n.º 2
0
 /**
  * @depends testOpen
  * @param AbstractCsv $structure
  */
 public function testClose($structure)
 {
     $this->assertTrue($structure->isFileOpened());
     $this->assertInstanceOf('CSanquer\\ColibriCsv\\AbstractCsv', $structure->close());
     $this->assertFalse($structure->isFileOpened());
     $this->assertNotInternalType('resource', $structure->getFileHandler());
 }
Exemplo n.º 3
0
 /**
  * open a csv file to read
  *
  * @param  string|resource $file filename or stream resource, default = null
  * @return CsvReader
  */
 public function open($file = null)
 {
     parent::open($file);
     $this->detectEncoding();
     return $this;
 }