当前位置: 首页>>代码示例>>PHP>>正文


PHP PhabricatorDestructionEngine::getViewer方法代码示例

本文整理汇总了PHP中PhabricatorDestructionEngine::getViewer方法的典型用法代码示例。如果您正苦于以下问题:PHP PhabricatorDestructionEngine::getViewer方法的具体用法?PHP PhabricatorDestructionEngine::getViewer怎么用?PHP PhabricatorDestructionEngine::getViewer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PhabricatorDestructionEngine的用法示例。


在下文中一共展示了PhabricatorDestructionEngine::getViewer方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: destroyObjectPermanently

 public function destroyObjectPermanently(PhabricatorDestructionEngine $engine)
 {
     $interfaces = id(new AlmanacInterfaceQuery())->setViewer($engine->getViewer())->withNetworkPHIDs(array($this->getPHID()))->execute();
     foreach ($interfaces as $interface) {
         $engine->destroyObject($interface);
     }
     $this->delete();
 }
开发者ID:NeoArmageddon,项目名称:phabricator,代码行数:8,代码来源:AlmanacNetwork.php

示例2: destroyObjectPermanently

 public function destroyObjectPermanently(PhabricatorDestructionEngine $engine)
 {
     $bindings = id(new AlmanacBindingQuery())->setViewer($engine->getViewer())->withInterfacePHIDs(array($this->getPHID()))->execute();
     foreach ($bindings as $binding) {
         $engine->destroyObject($binding);
     }
     $this->delete();
 }
开发者ID:pugong,项目名称:phabricator,代码行数:8,代码来源:AlmanacInterface.php

示例3: destroyObjectPermanently

 public function destroyObjectPermanently(PhabricatorDestructionEngine $engine)
 {
     $file_phid = $this->getFilePHID();
     $file = id(new PhabricatorFileQuery())->setViewer($engine->getViewer())->withPHIDs(array($file_phid))->executeOne();
     if ($file) {
         $engine->destroyObject($file);
     }
     $this->delete();
 }
开发者ID:rchicoli,项目名称:phabricator,代码行数:9,代码来源:PhabricatorRepositoryGitLFSRef.php

示例4: destroyObjectPermanently

 public function destroyObjectPermanently(PhabricatorDestructionEngine $engine)
 {
     $viewer = $engine->getViewer();
     $this->openTransaction();
     $packages = id(new PhabricatorPackagesPackageQuery())->setViewer($viewer)->withPublisherPHIDs(array($this->getPHID()))->execute();
     foreach ($packages as $package) {
         $engine->destroyObject($package);
     }
     $this->delete();
     $this->saveTransaction();
 }
开发者ID:NeoArmageddon,项目名称:phabricator,代码行数:11,代码来源:PhabricatorPackagesPublisher.php

示例5: destroyObjectPermanently

 public function destroyObjectPermanently(PhabricatorDestructionEngine $engine)
 {
     $this->openTransaction();
     $this->delete();
     $books = id(new DivinerBookQuery())->setViewer($engine->getViewer())->withRepositoryPHIDs(array($this->getPHID()))->execute();
     foreach ($books as $book) {
         $engine->destroyObject($book);
     }
     $atoms = id(new DivinerAtomQuery())->setViewer($engine->getViewer())->withRepositoryPHIDs(array($this->getPHID()))->execute();
     foreach ($atoms as $atom) {
         $engine->destroyObject($atom);
     }
     $this->saveTransaction();
 }
开发者ID:patelhardik,项目名称:phabricator,代码行数:14,代码来源:PhabricatorRepository.php

示例6: destroyObjectPermanently

 public function destroyObjectPermanently(PhabricatorDestructionEngine $engine)
 {
     $this->openTransaction();
     $posts = id(new PhamePostQuery())->setViewer($engine->getViewer())->withBlogPHIDs(array($this->getPHID()))->execute();
     foreach ($posts as $post) {
         $engine->destroyObject($post);
     }
     $this->delete();
     $this->saveTransaction();
 }
开发者ID:endlessm,项目名称:phabricator,代码行数:10,代码来源:PhameBlog.php

示例7: destroyObjectPermanently

 public function destroyObjectPermanently(PhabricatorDestructionEngine $engine)
 {
     $this->openTransaction();
     $diffs = id(new DifferentialDiffQuery())->setViewer($engine->getViewer())->withRevisionIDs(array($this->getID()))->execute();
     foreach ($diffs as $diff) {
         $engine->destroyObject($diff);
     }
     $conn_w = $this->establishConnection('w');
     queryfx($conn_w, 'DELETE FROM %T WHERE revisionID = %d', self::TABLE_COMMIT, $this->getID());
     // we have to do paths a little differentally as they do not have
     // an id or phid column for delete() to act on
     $dummy_path = new DifferentialAffectedPath();
     queryfx($conn_w, 'DELETE FROM %T WHERE revisionID = %d', $dummy_path->getTableName(), $this->getID());
     $this->delete();
     $this->saveTransaction();
 }
开发者ID:truSense,项目名称:phabricator,代码行数:16,代码来源:DifferentialRevision.php

示例8: destroyObjectPermanently

 public function destroyObjectPermanently(PhabricatorDestructionEngine $engine)
 {
     $phid = $this->getPHID();
     $this->openTransaction();
     $this->delete();
     PhabricatorRepositoryURIIndex::updateRepositoryURIs($phid, array());
     $books = id(new DivinerBookQuery())->setViewer($engine->getViewer())->withRepositoryPHIDs(array($phid))->execute();
     foreach ($books as $book) {
         $engine->destroyObject($book);
     }
     $atoms = id(new DivinerAtomQuery())->setViewer($engine->getViewer())->withRepositoryPHIDs(array($phid))->execute();
     foreach ($atoms as $atom) {
         $engine->destroyObject($atom);
     }
     $lfs_refs = id(new PhabricatorRepositoryGitLFSRefQuery())->setViewer($engine->getViewer())->withRepositoryPHIDs(array($phid))->execute();
     foreach ($lfs_refs as $ref) {
         $engine->destroyObject($ref);
     }
     $this->saveTransaction();
 }
开发者ID:rchicoli,项目名称:phabricator,代码行数:20,代码来源:PhabricatorRepository.php

示例9: destroyObjectPermanently

 public function destroyObjectPermanently(PhabricatorDestructionEngine $engine)
 {
     $awards = id(new PhabricatorBadgesAwardQuery())->setViewer($engine->getViewer())->withBadgePHIDs(array($this->getPHID()))->execute();
     foreach ($awards as $award) {
         $engine->destroyObject($award);
     }
     $this->openTransaction();
     $this->delete();
     $this->saveTransaction();
 }
开发者ID:rchicoli,项目名称:phabricator,代码行数:10,代码来源:PhabricatorBadgesBadge.php

示例10: destroyObjectPermanently

 public function destroyObjectPermanently(PhabricatorDestructionEngine $engine)
 {
     $this->openTransaction();
     $this->delete();
     $externals = id(new PhabricatorExternalAccount())->loadAllWhere('userPHID = %s', $this->getPHID());
     foreach ($externals as $external) {
         $external->delete();
     }
     $prefs = id(new PhabricatorUserPreferencesQuery())->setViewer($engine->getViewer())->withUsers(array($this))->execute();
     foreach ($prefs as $pref) {
         $engine->destroyObject($pref);
     }
     $profiles = id(new PhabricatorUserProfile())->loadAllWhere('userPHID = %s', $this->getPHID());
     foreach ($profiles as $profile) {
         $profile->delete();
     }
     $keys = id(new PhabricatorAuthSSHKeyQuery())->setViewer($engine->getViewer())->withObjectPHIDs(array($this->getPHID()))->execute();
     foreach ($keys as $key) {
         $engine->destroyObject($key);
     }
     $emails = id(new PhabricatorUserEmail())->loadAllWhere('userPHID = %s', $this->getPHID());
     foreach ($emails as $email) {
         $email->delete();
     }
     $sessions = id(new PhabricatorAuthSession())->loadAllWhere('userPHID = %s', $this->getPHID());
     foreach ($sessions as $session) {
         $session->delete();
     }
     $factors = id(new PhabricatorAuthFactorConfig())->loadAllWhere('userPHID = %s', $this->getPHID());
     foreach ($factors as $factor) {
         $factor->delete();
     }
     $this->saveTransaction();
 }
开发者ID:endlessm,项目名称:phabricator,代码行数:34,代码来源:PhabricatorUser.php

示例11: destroyTransform

 private function destroyTransform(PhabricatorTransformedFile $xform)
 {
     $engine = new PhabricatorDestructionEngine();
     $file = id(new PhabricatorFileQuery())->setViewer($engine->getViewer())->withPHIDs(array($xform->getTransformedPHID()))->executeOne();
     $unguarded = AphrontWriteGuard::beginScopedUnguardedWrites();
     if (!$file) {
         if ($xform->getID()) {
             $xform->delete();
         }
     } else {
         $engine->destroyObject($file);
     }
     unset($unguarded);
 }
开发者ID:pugong,项目名称:phabricator,代码行数:14,代码来源:PhabricatorFileTransformController.php

示例12: destroyObjectPermanently

 public function destroyObjectPermanently(PhabricatorDestructionEngine $engine)
 {
     $viewer = $engine->getViewer();
     $this->openTransaction();
     $trigger_phid = $this->getTriggerPHID();
     if ($trigger_phid) {
         $trigger = id(new PhabricatorWorkerTriggerQuery())->setViewer($viewer)->withPHIDs(array($trigger_phid))->executeOne();
         if ($trigger) {
             $engine->destroyObject($trigger);
         }
     }
     $events = id(new PhabricatorCalendarEventQuery())->setViewer($viewer)->withImportSourcePHIDs(array($this->getPHID()))->execute();
     foreach ($events as $event) {
         $engine->destroyObject($event);
     }
     $logs = id(new PhabricatorCalendarImportLogQuery())->setViewer($viewer)->withImportPHIDs(array($this->getPHID()))->execute();
     foreach ($logs as $log) {
         $engine->destroyObject($log);
     }
     $this->delete();
     $this->saveTransaction();
 }
开发者ID:NeoArmageddon,项目名称:phabricator,代码行数:22,代码来源:PhabricatorCalendarImport.php

示例13: destroyObjectPermanently

 public function destroyObjectPermanently(PhabricatorDestructionEngine $engine)
 {
     $viewer = $engine->getViewer();
     $this->delete();
 }
开发者ID:NeoArmageddon,项目名称:phabricator,代码行数:5,代码来源:PhabricatorCalendarImportLog.php


注:本文中的PhabricatorDestructionEngine::getViewer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。