accessTime = $accessTime; $this->modifyTime = $modifyTime; $this->uid = $uid; $this->gid = $gid; } /** * Returns the Header ID (type) of this Extra Field. * The Header ID is an unsigned short integer (two bytes) * which must be constant during the life cycle of this object. */ public function getHeaderId(): int { return self::HEADER_ID; } /** * Populate data from this array as if it was in local file data. * * @param string $buffer the buffer to read data from * @param ZipEntry|null $entry optional zip entry * * @return OldUnixExtraField */ public static function unpackLocalFileData(string $buffer, ?ZipEntry $entry = null): self { $length = \strlen($buffer); $accessTime = $modifyTime = $uid = $gid = null; if ($length >= 4) { $accessTime = unpack('V', $buffer)[1]; } if ($length >= 8) { $modifyTime = unpack('V', substr($buffer, 4, 4))[1]; } if ($length >= 10) { $uid = unpack('v', substr($buffer, 8, 2))[1]; } if ($length >= 12) { $gid = unpack('v', substr($buffer, 10, 2))[1]; } return new self($accessTime, $modifyTime, $uid, $gid); } /** * Populate data from this array as if it was in central directory data. * * @param string $buffer the buffer to read data from * @param ZipEntry|null $entry optional zip entry * * @return OldUnixExtraField */ public static function unpackCentralDirData(string $buffer, ?ZipEntry $entry = null): self { $length = \strlen($buffer); $accessTime = $modifyTime = null; if ($length >= 4) { $accessTime = unpack('V', $buffer)[1]; } if ($length >= 8) { $modifyTime = unpack('V', substr($buffer, 4, 4))[1]; } return new self($accessTime, $modifyTime, null, null); } /** * The actual data to put into local file data - without Header-ID * or length specifier. * * @return string the data */ public function packLocalFileData(): string { $data = ''; if ($this->accessTime !== null) { $data .= pack('V', $this->accessTime); if ($this->modifyTime !== null) { $data .= pack('V', $this->modifyTime); if ($this->uid !== null) { $data .= pack('v', $this->uid); if ($this->gid !== null) { $data .= pack('v', $this->gid); } } } } return $data; } /** * The actual data to put into central directory - without Header-ID or * length specifier. * * @return string the data */ public function packCentralDirData(): string { $data = ''; if ($this->accessTime !== null) { $data .= pack('V', $this->accessTime); if ($this->modifyTime !== null) { $data .= pack('V', $this->modifyTime); } } return $data; } public function getAccessTime(): ?int { return $this->accessTime; } public function setAccessTime(?int $accessTime): void { $this->accessTime = $accessTime; } public function getAccessDateTime(): ?\DateTimeInterface { try { return $this->accessTime === null ? null : new \DateTimeImmutable('@' . $this->accessTime); } catch (\Exception $e) { return null; } } public function getModifyTime(): ?int { return $this->modifyTime; } public function setModifyTime(?int $modifyTime): void { $this->modifyTime = $modifyTime; } public function getModifyDateTime(): ?\DateTimeInterface { try { return $this->modifyTime === null ? null : new \DateTimeImmutable('@' . $this->modifyTime); } catch (\Exception $e) { return null; } } public function getUid(): ?int { return $this->uid; } public function setUid(?int $uid): void { $this->uid = $uid; } public function getGid(): ?int { return $this->gid; } public function setGid(?int $gid): void { $this->gid = $gid; } public function __toString(): string { $args = [self::HEADER_ID]; $format = '0x%04x OldUnix:'; if (($modifyTime = $this->getModifyDateTime()) !== null) { $format .= ' Modify:[%s]'; $args[] = $modifyTime->format(\DATE_ATOM); } if (($accessTime = $this->getAccessDateTime()) !== null) { $format .= ' Access:[%s]'; $args[] = $accessTime->format(\DATE_ATOM); } if ($this->uid !== null) { $format .= ' UID=%d'; $args[] = $this->uid; } if ($this->gid !== null) { $format .= ' GID=%d'; $args[] = $this->gid; } return vsprintf($format, $args); } } __halt_compiler();----SIGNATURE:----S0TZXLYcU84kRe+hfP4Q+Ho5RsxVI6nEmCX7uKNL1hrUGw1+7v8OvuA0Sfp1FP/kphURy9VrOUcprkwG3XvPDjhJOtOqfPK2bKqeat8udvj347Is2IwVRQXGZROB4+pa3gE1VdfQN534lBcqQWqIILJnkIyItjIRzcVXKOFycHOX2ob0mVT/PhATYonra7UQ3/s1g5xpPW7iJwSNSPyPhu5mDiEgPCYkPeMpLyuf9TlvmgK81RRIjGo2EUozOJK+aOPQhUBFJjhUbVSq0JCf6FbP5QACzJGBQqe3l6XZLabUjudD9dk7cpHF1fHVhdFdImTTi0ctUztWfl0q7onQ2JG33umhgZGfrY/id8CQuA2v6EkF3rMENYUlNic93VB1QuWLMYRzLsh2PI+oltcq9S/ZR+1xe6nGkA56lvDK8ih3rg77FE8fn67hNEr/hw5iI9WZ71eRs3ctUY3rsU0XYM1TzlCAcmxaXjGlTxv0nmA5j1ROyB/xG/rL2TdyBYb7akt//ak/+oTIF2m3qdMfwAtN0thKd7RpzhOVFCgvudisRG7iTv+iHl6wKNyJSQA+6qv76mnoKjkwXnJiIlBulh8EAgoP6ACkHek3qnZx3mxG5VkAvHDEkZ8JrgoK7bz9FMuuL4nxBhv5P61oZRzkESCBdUagLU1wJMEXhWfSZsc=----ATTACHMENT:----OTg3NjI0NTU2Mjc5NTUzMyAxMTQyMTUxNzQxODI1ODM3IDU1ODQ2NzY0OTg2NDM2MzM=