Path: blob/master/src/applications/chatlog/storage/PhabricatorChatLogEvent.php
12242 views
<?php12final class PhabricatorChatLogEvent3extends PhabricatorChatLogDAO4implements PhabricatorPolicyInterface {56protected $channelID;7protected $epoch;8protected $author;9protected $type;10protected $message;11protected $loggedByPHID;1213private $channel = self::ATTACHABLE;1415protected function getConfiguration() {16return array(17self::CONFIG_TIMESTAMPS => false,18self::CONFIG_COLUMN_SCHEMA => array(19'author' => 'text64',20'type' => 'text4',21'message' => 'text',22),23self::CONFIG_KEY_SCHEMA => array(24'channel' => array(25'columns' => array('epoch'),26),27),28) + parent::getConfiguration();29}3031public function attachChannel(PhabricatorChatLogChannel $channel) {32$this->channel = $channel;33return $this;34}3536public function getChannel() {37return $this->assertAttached($this->channel);38}394041/* -( PhabricatorPolicyInterface )----------------------------------------- */424344public function getCapabilities() {45return array(46PhabricatorPolicyCapability::CAN_VIEW,47);48}4950public function getPolicy($capability) {51return $this->getChannel()->getPolicy($capability);52}5354public function hasAutomaticCapability($capability, PhabricatorUser $viewer) {55return $this->getChannel()->hasAutomaticCapability($capability, $viewer);56}5758}596061