/** * Read file */ private function readFile() { while (!$this->Reader->eof()) { $Line = trim($this->Reader->readLine()); if (substr($Line, 0, 8) == '{"TABLE"') { $TableName = substr($Line, 10, -2); $this->readTable($TableName); } } }
/** * Construct * @param string $fileName */ public function __construct($fileName) { $Reader = new BigFileReaderGZip($fileName); while (!$Reader->eof()) { $Line = trim($Reader->readLine()); if (substr($Line, 0, 8) == '{"TABLE"') { $TableName = substr($Line, 10, -2); $this->NumberOf[$TableName] = 0; } elseif ($Line != '' && $Line[0] == '{') { $this->NumberOf[$TableName]++; } } $Reader->close(); }