This repository has been archived by the owner on Aug 22, 2023. It is now read-only.
forked from quafzi/payone-magento
/
Abstract.php
108 lines (99 loc) · 2.67 KB
/
Abstract.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?php
/**
*
* NOTICE OF LICENSE
*
* This source file is subject to the GNU General Public License (GPL 3)
* that is bundled with this package in the file LICENSE.txt
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Payone_Core to newer
* versions in the future. If you wish to customize Payone_Core for your
* needs please refer to http://www.payone.de for more information.
*
* @category Payone
* @package Payone_Core_Model
* @subpackage Service
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
* @author Matthias Walter <info@noovias.com>
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
/**
*
* @category Payone
* @package Payone_Core_Model
* @subpackage Service
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
* @link http://www.noovias.com
*/
abstract class Payone_Core_Model_Service_Abstract
{
/**
* @var Payone_Core_Model_Config_Interface
*/
protected $configStore = null;
/** @var Payone_Core_Model_Factory */
protected $factory = null;
/** @var Payone_Core_Helper_Data */
protected $helper = null;
/**
*
* @return Payone_Core_Model_Factory
*/
public function getFactory()
{
if ($this->factory === null) {
$this->factory = new Payone_Core_Model_Factory();
}
return $this->factory;
}
/**
*
* @param Payone_Core_Model_Factory $factory
*/
public function setFactory(Payone_Core_Model_Factory $factory)
{
$this->factory = $factory;
}
/**
* @return Payone_Core_Helper_Data
*/
protected function helper()
{
if ($this->helper === null) {
$this->helper = $this->getFactory()->helper();
}
return $this->helper;
}
/**
* @param Payone_Core_Model_Config_Interface $config
*/
public function setConfigStore(Payone_Core_Model_Config_Interface $config)
{
$this->configStore = $config;
}
/**
* @return Payone_Core_Model_Config_Interface
*/
public function getConfigStore()
{
return $this->configStore;
}
/**
* @return Payone_Core_Helper_Config
*/
protected function helperConfig()
{
return $this->getFactory()->helperConfig();
}
/**
* @return Payone_Core_Helper_Registry
*/
protected function helperRegistry()
{
return $this->getFactory()->helperRegistry();
}
}