Skip to content

[3.0]: Abstract Customer object #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 3 additions & 35 deletions src/Omnipay/Common/AbstractGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,9 @@
*
* @see GatewayInterface
*/
abstract class AbstractGateway implements GatewayInterface
abstract class AbstractGateway implements GatewayInterface, ParameterizedInterface
{
/**
* @var ParameterBag
*/
protected $parameters;
use HasParametersTrait;

/**
* @var ClientInterface
Expand Down Expand Up @@ -101,7 +98,7 @@ public function initialize(array $parameters = array())
}
}

Helper::initialize($this, $parameters);
Helper::initializeParameters($this, $parameters);

return $this;
}
Expand All @@ -114,35 +111,6 @@ public function getDefaultParameters()
return array();
}

/**
* @return array
*/
public function getParameters()
{
return $this->parameters->all();
}

/**
* @param string $key
* @return mixed
*/
public function getParameter($key)
{
return $this->parameters->get($key);
}

/**
* @param string $key
* @param mixed $value
* @return $this
*/
public function setParameter($key, $value)
{
$this->parameters->set($key, $value);

return $this;
}

/**
* @return boolean
*/
Expand Down
Loading