[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/mailinglists/storage/ -> PhabricatorMetaMTAMailingList.php (source)

   1  <?php
   2  
   3  final class PhabricatorMetaMTAMailingList extends PhabricatorMetaMTADAO
   4    implements
   5      PhabricatorPolicyInterface,
   6      PhabricatorDestructibleInterface {
   7  
   8    protected $name;
   9    protected $email;
  10    protected $uri;
  11  
  12    public function generatePHID() {
  13      return PhabricatorPHID::generateNewPHID(
  14        PhabricatorMailingListListPHIDType::TYPECONST);
  15    }
  16  
  17    public function getConfiguration() {
  18      return array(
  19        self::CONFIG_AUX_PHID => true,
  20        self::CONFIG_COLUMN_SCHEMA => array(
  21          'name' => 'text128',
  22          'email' => 'text128',
  23          'uri' => 'text255?',
  24        ),
  25        self::CONFIG_KEY_SCHEMA => array(
  26          'key_phid' => null,
  27          'phid' => array(
  28            'columns' => array('phid'),
  29            'unique' => true,
  30          ),
  31          'email' => array(
  32            'columns' => array('email'),
  33            'unique' => true,
  34          ),
  35          'name' => array(
  36            'columns' => array('name'),
  37            'unique' => true,
  38          ),
  39        ),
  40      ) + parent::getConfiguration();
  41    }
  42  
  43  
  44  /* -(  PhabricatorPolicyInterface  )----------------------------------------- */
  45  
  46  
  47    public function getCapabilities() {
  48      return array(
  49        PhabricatorPolicyCapability::CAN_VIEW,
  50      );
  51    }
  52  
  53    public function getPolicy($capability) {
  54      return PhabricatorPolicies::POLICY_USER;
  55    }
  56  
  57    public function hasAutomaticCapability($capability, PhabricatorUser $viewer) {
  58      return false;
  59    }
  60  
  61    public function describeAutomaticCapability($capability) {
  62      return null;
  63    }
  64  
  65  
  66  /* -(  PhabricatorDestructibleInterface  )----------------------------------- */
  67  
  68  
  69    public function destroyObjectPermanently(
  70      PhabricatorDestructionEngine $engine) {
  71  
  72      $this->openTransaction();
  73      $this->delete();
  74      $this->saveTransaction();
  75    }
  76  
  77  }


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