Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / phortune / product / PhortuneAdHocProduct.php
blobfde10376fb6d96d5975ba389f1a700a6c6721cbb
1 <?php
3 final class PhortuneAdHocProduct extends PhortuneProductImplementation {
5 private $ref;
7 public function loadImplementationsForRefs(
8 PhabricatorUser $viewer,
9 array $refs) {
11 $results = array();
12 foreach ($refs as $key => $ref) {
13 $product = new PhortuneAdHocProduct();
14 $product->ref = $ref;
15 $results[$key] = $product;
18 return $results;
21 public function getRef() {
22 return $this->ref;
25 public function getName(PhortuneProduct $product) {
26 return pht('Ad-Hoc Product');
29 public function getPurchaseName(
30 PhortuneProduct $product,
31 PhortunePurchase $purchase) {
33 return coalesce(
34 $purchase->getMetadataValue('adhoc.name'),
35 $this->getName($product));
38 public function getPriceAsCurrency(PhortuneProduct $product) {
39 return PhortuneCurrency::newEmptyCurrency();