Changeset View
Changeset View
Standalone View
Standalone View
src/applications/tokens/storage/PhabricatorTokenGiven.php
<?php | <?php | ||||
final class PhabricatorTokenGiven extends PhabricatorTokenDAO | final class PhabricatorTokenGiven extends PhabricatorTokenDAO | ||||
implements PhabricatorPolicyInterface { | implements PhabricatorPolicyInterface { | ||||
protected $authorPHID; | protected $authorPHID; | ||||
protected $objectPHID; | protected $objectPHID; | ||||
protected $tokenPHID; | protected $tokenPHID; | ||||
private $object = self::ATTACHABLE; | private $object = self::ATTACHABLE; | ||||
public function getConfiguration() { | public function getConfiguration() { | ||||
return array( | return array( | ||||
self::CONFIG_KEY_SCHEMA => array( | self::CONFIG_KEY_SCHEMA => array( | ||||
'key_all' => array( | 'key_all' => array( | ||||
'columns' => array('objectPHID', 'authorPHID'), | 'columns' => array('objectPHID', 'authorPHID'), | ||||
'unique' => true, | |||||
), | |||||
'key_author' => array( | |||||
'columns' => array('authorPHID'), | |||||
), | |||||
'key_token' => array( | |||||
'columns' => array('tokenPHID'), | |||||
), | ), | ||||
), | ), | ||||
) + parent::getConfiguration(); | ) + parent::getConfiguration(); | ||||
} | } | ||||
public function attachObject(PhabricatorTokenReceiverInterface $object) { | public function attachObject(PhabricatorTokenReceiverInterface $object) { | ||||
$this->object = $object; | $this->object = $object; | ||||
return $this; | return $this; | ||||
▲ Show 20 Lines • Show All 50 Lines • Show Last 20 Lines |