Changeset View
Changeset View
Standalone View
Standalone View
src/applications/files/format/PhabricatorFileStorageFormat.php
Show All 20 Lines | abstract class PhabricatorFileStorageFormat | ||||
abstract public function newReadIterator($raw_iterator); | abstract public function newReadIterator($raw_iterator); | ||||
abstract public function newWriteIterator($raw_iterator); | abstract public function newWriteIterator($raw_iterator); | ||||
public function newStorageProperties() { | public function newStorageProperties() { | ||||
return array(); | return array(); | ||||
} | } | ||||
public function canGenerateNewKeyMaterial() { | |||||
return false; | |||||
} | |||||
public function generateNewKeyMaterial() { | |||||
throw new PhutilMethodNotImplementedException(); | |||||
} | |||||
public function canCycleMasterKey() { | |||||
return false; | |||||
} | |||||
public function cycleStorageProperties() { | |||||
throw new PhutilMethodNotImplementedException(); | |||||
} | |||||
public function selectMasterKey($key_name) { | |||||
throw new Exception( | |||||
pht( | |||||
'This storage format ("%s") does not support key selection.', | |||||
$this->getStorageFormatName())); | |||||
} | |||||
final public function getStorageFormatKey() { | final public function getStorageFormatKey() { | ||||
return $this->getPhobjectClassConstant('FORMATKEY'); | return $this->getPhobjectClassConstant('FORMATKEY'); | ||||
} | } | ||||
final public static function getAllFormats() { | final public static function getAllFormats() { | ||||
return id(new PhutilClassMapQuery()) | return id(new PhutilClassMapQuery()) | ||||
->setAncestorClass(__CLASS__) | ->setAncestorClass(__CLASS__) | ||||
->setUniqueMethod('getStorageFormatKey') | ->setUniqueMethod('getStorageFormatKey') | ||||
Show All 22 Lines |