[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/chatlog/storage/ -> PhabricatorChatLogChannel.php (source)

   1  <?php
   2  
   3  final class PhabricatorChatLogChannel
   4    extends PhabricatorChatLogDAO
   5    implements PhabricatorPolicyInterface {
   6  
   7    protected $serviceName;
   8    protected $serviceType;
   9    protected $channelName;
  10    protected $viewPolicy;
  11    protected $editPolicy;
  12  
  13    public function getConfiguration() {
  14      return array(
  15        self::CONFIG_COLUMN_SCHEMA => array(
  16          'serviceName' => 'text64',
  17          'serviceType' => 'text32',
  18          'channelName' => 'text64',
  19        ),
  20        self::CONFIG_KEY_SCHEMA => array(
  21          'key_channel' => array(
  22            'columns' => array('channelName', 'serviceType', 'serviceName'),
  23            'unique' => true,
  24          ),
  25        ),
  26      ) + parent::getConfiguration();
  27    }
  28  
  29    public function getCapabilities() {
  30      return array(
  31        PhabricatorPolicyCapability::CAN_VIEW,
  32        PhabricatorPolicyCapability::CAN_EDIT,
  33      );
  34    }
  35  
  36    public function getPolicy($capability) {
  37      switch ($capability) {
  38        case PhabricatorPolicyCapability::CAN_VIEW:
  39          return $this->viewPolicy;
  40          break;
  41        case PhabricatorPolicyCapability::CAN_EDIT:
  42          return $this->editPolicy;
  43          break;
  44      }
  45    }
  46  
  47    public function hasAutomaticCapability($capability, PhabricatorUser $viewer) {
  48      return false;
  49    }
  50  
  51    public function describeAutomaticCapability($capability) {
  52      return null;
  53    }
  54  
  55  }


Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1