Path: blob/master/src/applications/nuance/storage/NuanceImportCursorData.php
12256 views
<?php12final class NuanceImportCursorData3extends NuanceDAO4implements PhabricatorPolicyInterface {56protected $sourcePHID;7protected $cursorKey;8protected $cursorType;9protected $properties = array();1011protected function getConfiguration() {12return array(13self::CONFIG_AUX_PHID => true,14self::CONFIG_SERIALIZATION => array(15'properties' => self::SERIALIZATION_JSON,16),17self::CONFIG_COLUMN_SCHEMA => array(18'cursorType' => 'text32',19'cursorKey' => 'text32',20),21self::CONFIG_KEY_SCHEMA => array(22'key_source' => array(23'columns' => array('sourcePHID', 'cursorKey'),24'unique' => true,25),26),27) + parent::getConfiguration();28}2930public function generatePHID() {31return PhabricatorPHID::generateNewPHID(32NuanceImportCursorPHIDType::TYPECONST);33}3435public function getCursorProperty($key, $default = null) {36return idx($this->properties, $key, $default);37}3839public function setCursorProperty($key, $value) {40$this->properties[$key] = $value;41return $this;42}434445/* -( PhabricatorPolicyInterface )----------------------------------------- */464748public function getCapabilities() {49return array(50PhabricatorPolicyCapability::CAN_VIEW,51);52}5354public function getPolicy($capability) {55switch ($capability) {56case PhabricatorPolicyCapability::CAN_VIEW:57return PhabricatorPolicies::POLICY_USER;58}59}6061public function hasAutomaticCapability($capability, PhabricatorUser $viewer) {62return false;63}6465}666768