/**
  * 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);
         }
     }
 }
Ejemplo n.º 2
0
 /**
  * Construct
  * @param string $fileName
  */
 public function __construct($fileName)
 {
     $Reader = new GZipReader(FRONTEND_PATH . $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();
 }