/** * @return string The version of the field for the Central Header. */ public function getCentralField() { if ($this->centralData != null) { return parent::encodeField($this->header, $this->centralData); } return $this->getLocalField(); }
public function __construct($handle = null) { parent::__construct(); if ($handle != null) { $this->header = fread($handle, 2); $arr = unpack('v', fread($handle, 2)); $this->length = $arr[1]; $this->version = fread($handle, 1); $arr = unpack("V", fread($handle, 4)); $this->CRC32 = $arr[1]; $this->utf8Data = fread($handle, $this->length - 5); } }