1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-07 21:31:02 +01:00
phorge-phorge/src/applications/phortune/subscription/PhortuneSubscriptionImplementation.php
Joshua Spence b6d745b666 Extend from Phobject
Summary: All classes should extend from some other class. See D13275 for some explanation.

Test Plan: `arc unit`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13283
2015-06-15 18:02:27 +10:00

51 lines
1.3 KiB
PHP

<?php
abstract class PhortuneSubscriptionImplementation extends Phobject {
abstract public function loadImplementationsForRefs(
PhabricatorUser $viewer,
array $refs);
abstract public function getRef();
abstract public function getName(PhortuneSubscription $subscription);
public function getFullName(PhortuneSubscription $subscription) {
return $this->getName($subscription);
}
public function getCrumbName(PhortuneSubscription $subscription) {
return $this->getName($subscription);
}
abstract public function getCostForBillingPeriodAsCurrency(
PhortuneSubscription $subscription,
$start_epoch,
$end_epoch);
public function shouldInvoiceForBillingPeriod(
PhortuneSubscription $subscription,
$start_epoch,
$end_epoch) {
return true;
}
public function getCartName(
PhortuneSubscription $subscription,
PhortuneCart $cart) {
return pht('Subscription');
}
public function getPurchaseName(
PhortuneSubscription $subscription,
PhortuneProduct $product,
PhortunePurchase $purchase) {
return $product->getProductName();
}
public function getPurchaseURI(
PhortuneSubscription $subscription,
PhortuneProduct $product,
PhortunePurchase $purchase) {
return null;
}
}