/** * 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; }
/** * @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()); }
/** * 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; }