Skip to content

Commit da2addb

Browse files
committed
Merge pull request #80 from thephpleague/customerObject
[3.0]: Abstract Customer object
2 parents 26e974e + 24325f1 commit da2addb

12 files changed

+717
-1488
lines changed

src/Omnipay/Common/AbstractGateway.php

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,9 @@
4242
*
4343
* @see GatewayInterface
4444
*/
45-
abstract class AbstractGateway implements GatewayInterface
45+
abstract class AbstractGateway implements GatewayInterface, ParameterizedInterface
4646
{
47-
/**
48-
* @var ParameterBag
49-
*/
50-
protected $parameters;
47+
use HasParametersTrait;
5148

5249
/**
5350
* @var ClientInterface
@@ -101,7 +98,7 @@ public function initialize(array $parameters = array())
10198
}
10299
}
103100

104-
Helper::initialize($this, $parameters);
101+
Helper::initializeParameters($this, $parameters);
105102

106103
return $this;
107104
}
@@ -114,35 +111,6 @@ public function getDefaultParameters()
114111
return array();
115112
}
116113

117-
/**
118-
* @return array
119-
*/
120-
public function getParameters()
121-
{
122-
return $this->parameters->all();
123-
}
124-
125-
/**
126-
* @param string $key
127-
* @return mixed
128-
*/
129-
public function getParameter($key)
130-
{
131-
return $this->parameters->get($key);
132-
}
133-
134-
/**
135-
* @param string $key
136-
* @param mixed $value
137-
* @return $this
138-
*/
139-
public function setParameter($key, $value)
140-
{
141-
$this->parameters->set($key, $value);
142-
143-
return $this;
144-
}
145-
146114
/**
147115
* @return boolean
148116
*/

0 commit comments

Comments
 (0)