當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。