Differential D19149 Diff 45874 src/applications/harbormaster/storage/build/HarbormasterBuildLogChunk.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/harbormaster/storage/build/HarbormasterBuildLogChunk.php
| <?php | <?php | ||||
| final class HarbormasterBuildLogChunk | final class HarbormasterBuildLogChunk | ||||
| extends HarbormasterDAO { | extends HarbormasterDAO { | ||||
| protected $logID; | protected $logID; | ||||
| protected $encoding; | protected $encoding; | ||||
| protected $headOffset; | |||||
| protected $tailOffset; | |||||
| protected $size; | protected $size; | ||||
| protected $chunk; | protected $chunk; | ||||
| const CHUNK_ENCODING_TEXT = 'text'; | const CHUNK_ENCODING_TEXT = 'text'; | ||||
| const CHUNK_ENCODING_GZIP = 'gzip'; | const CHUNK_ENCODING_GZIP = 'gzip'; | ||||
| protected function getConfiguration() { | protected function getConfiguration() { | ||||
| return array( | return array( | ||||
| self::CONFIG_TIMESTAMPS => false, | self::CONFIG_TIMESTAMPS => false, | ||||
| self::CONFIG_BINARY => array( | self::CONFIG_BINARY => array( | ||||
| 'chunk' => true, | 'chunk' => true, | ||||
| ), | ), | ||||
| self::CONFIG_COLUMN_SCHEMA => array( | self::CONFIG_COLUMN_SCHEMA => array( | ||||
| 'logID' => 'id', | 'logID' => 'id', | ||||
| 'encoding' => 'text32', | 'encoding' => 'text32', | ||||
| 'headOffset' => 'uint64', | |||||
| 'tailOffset' => 'uint64', | |||||
| // T6203/NULLABILITY | // T6203/NULLABILITY | ||||
| // Both the type and nullability of this column are crazily wrong. | // Both the type and nullability of this column are crazily wrong. | ||||
| 'size' => 'uint32?', | 'size' => 'uint32?', | ||||
| 'chunk' => 'bytes', | 'chunk' => 'bytes', | ||||
| ), | ), | ||||
| self::CONFIG_KEY_SCHEMA => array( | self::CONFIG_KEY_SCHEMA => array( | ||||
| 'key_log' => array( | 'key_offset' => array( | ||||
| 'columns' => array('logID'), | 'columns' => array('logID', 'headOffset', 'tailOffset'), | ||||
| ), | ), | ||||
| ), | ), | ||||
| ) + parent::getConfiguration(); | ) + parent::getConfiguration(); | ||||
| } | } | ||||
| public function getChunkDisplayText() { | public function getChunkDisplayText() { | ||||
| $data = $this->getChunk(); | $data = $this->getChunk(); | ||||
| $encoding = $this->getEncoding(); | $encoding = $this->getEncoding(); | ||||
| Show All 21 Lines | |||||