Passed
Push — master ( c82ebd...83fcc6 )
by Aimeos
02:12
created

Base::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2018
6
 * @package Controller
7
 * @subpackage Common
8
 */
9
10
11
namespace Aimeos\Controller\Common\Subscription\Process\Processor;
12
13
14
/**
15
 * Abstract class with common methods for all subscription processors
16
 *
17
 * @package Controller
18
 * @subpackage Common
19
 */
20
class Base
21
{
22
	private $context;
23
24
25
	/**
26
	 * Initializes the object
27
	 *
28
	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object
29
	 */
30
	public function __construct( \Aimeos\MShop\Context\Item\Iface $context )
31
	{
32
		$this->context = $context;
33
	}
34
35
36
	/**
37
	 * Returns the context item
38
	 *
39
	 * @return \Aimeos\MShop\Context\Item\Iface Context object
40
	 */
41
	protected function getContext()
42
	{
43
		return $this->context;
44
	}
45
46
47
	/**
48
	 * Processes the initial subscription
49
	 *
50
	 * @param \Aimeos\MShop\Subscription\Item\Iface $subscription Subscription item
51
	 */
52
	public function begin( \Aimeos\MShop\Subscription\Item\Iface $subscription )
53
	{
54
	}
55
56
57
	/**
58
	 * Executed before the subscription renewal
59
	 *
60
	 * @param \Aimeos\MShop\Subscription\Item\Iface $subscription Subscription item
61
	 */
62
	public function renewBefore( \Aimeos\MShop\Subscription\Item\Iface $subscription )
63
	{
64
	}
65
66
67
	/**
68
	 * Executed after the subscription renewal
69
	 *
70
	 * @param \Aimeos\MShop\Subscription\Item\Iface $subscription Subscription item
71
	 * @param \Aimeos\MShop\Order\Item\Iface $order Order invoice item
72
	 */
73
	public function renewAfter( \Aimeos\MShop\Subscription\Item\Iface $subscription, \Aimeos\MShop\Order\Item\Iface $order )
74
	{
75
	}
76
77
78
	/**
79
	 * Processes the end of the subscription
80
	 *
81
	 * @param \Aimeos\MShop\Subscription\Item\Iface $subscription Subscription item
82
	 */
83
	public function end( \Aimeos\MShop\Subscription\Item\Iface $subscription )
84
	{
85
	}
86
}
87