Example #1
0
 private function __readPropertySets()
 {
     $offset = 0;
     while ($offset < strlen($this->entry)) {
         $d = substr($this->entry, $offset, self::PROPERTY_STORAGE_BLOCK_SIZE);
         $nameSize = ord($d[self::SIZE_OF_NAME_POS]) | ord($d[self::SIZE_OF_NAME_POS + 1]) << 8;
         $type = ord($d[self::TYPE_POS]);
         $startBlock = ExelReaderHelper::GetInt4d($d, self::START_BLOCK_POS);
         $size = ExelReaderHelper::GetInt4d($d, self::SIZE_POS);
         $name = '';
         for ($i = 0; $i < $nameSize; $i++) {
             $name .= $d[$i];
         }
         $name = str_replace("", "", $name);
         $this->props[] = ['name' => $name, 'type' => $type, 'startBlock' => $startBlock, 'size' => $size];
         if (strtolower($name) == "workbook" || strtolower($name) == "book") {
             $this->wrkbook = count($this->props) - 1;
         }
         if ($name == "Root Entry") {
             $this->rootentry = count($this->props) - 1;
         }
         $offset += self::PROPERTY_STORAGE_BLOCK_SIZE;
     }
 }