mtime = PackUtil::unpackLongLE(substr($tagData, 0, 8)) / 10000000 - 11644473600; $this->atime = PackUtil::unpackLongLE(substr($tagData, 8, 8)) / 10000000 - 11644473600; $this->ctime = PackUtil::unpackLongLE(substr($tagData, 16, 8)) / 10000000 - 11644473600; } } /** * Serializes a Data Block. * * @return string */ public function serialize() { $serialize = ''; if ($this->mtime !== null && $this->atime !== null && $this->ctime !== null) { $mtimeLong = ($this->mtime + 11644473600) * 10000000; $atimeLong = ($this->atime + 11644473600) * 10000000; $ctimeLong = ($this->ctime + 11644473600) * 10000000; $serialize .= pack('Vvv', 0, 1, 8 * 3) . PackUtil::packLongLE($mtimeLong) . PackUtil::packLongLE($atimeLong) . PackUtil::packLongLE($ctimeLong); } return $serialize; } /** * @return int */ public function getMtime() { return $this->mtime; } /** * @param int $mtime */ public function setMtime($mtime) { $this->mtime = (int) $mtime; } /** * @return int */ public function getAtime() { return $this->atime; } /** * @param int $atime */ public function setAtime($atime) { $this->atime = (int) $atime; } /** * @return int */ public function getCtime() { return $this->ctime; } /** * @param int $ctime */ public function setCtime($ctime) { $this->ctime = (int) $ctime; } }