1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-24 13:38:19 +01:00
phorge-phorge/src/applications/transactions/exception/PhabricatorApplicationTransactionNoEffectException.php
Joshua Spence f47e69c015 Mark some strings for translation
Summary: Add some more `pht`izations.

Test Plan: Eyeball it.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: hach-que, Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D13200
2015-06-09 23:06:52 +10:00

38 lines
910 B
PHP

<?php
final class PhabricatorApplicationTransactionNoEffectException
extends Exception {
private $transactions;
private $anyEffect;
private $hasComment;
public function __construct(array $transactions, $any_effect, $has_comment) {
assert_instances_of($transactions, 'PhabricatorApplicationTransaction');
$this->transactions = $transactions;
$this->anyEffect = $any_effect;
$this->hasComment = $has_comment;
$message = array();
$message[] = pht('Transactions have no effect:');
foreach ($this->transactions as $transaction) {
$message[] = ' - '.$transaction->getNoEffectDescription();
}
parent::__construct(implode("\n", $message));
}
public function getTransactions() {
return $this->transactions;
}
public function hasAnyEffect() {
return $this->anyEffect;
}
public function hasComment() {
return $this->hasComment;
}
}