/** * @param $endpoint * @param array $data * @return string */ protected function buildUrl($endpoint, array $data) { $endpoint = preg_replace_callback('~\\:(?P<name>[a-z0-9]+)~i', function ($m) use($data) { if (empty($data[$m['name']])) { throw new InvalidArgumentException(sprintF('Missing key %s for the assembly of url', $m['name'])); } return urlencode($data[$m['name']]); }, $endpoint); return $this->config->getUrl() . '/' . $endpoint; }
public function __construct() { $this->defaults['sandbox']['publicKey'] = Configuration::getCsobSandboxCertPath(); $this->defaults['production']['publicKey'] = Configuration::getCsobProductionCertPath(); }