public function __construct($configuration, $log) { $this->proxyLog = $log; $this->proxyConfig = $configuration->proxyConfig; $this->serverUrls = $configuration->serverUrls; $this->setupSession(); $this->setupClassProperties(); $this->checkEmptyParameters(); if ($this->proxyConfig['mustmatch'] != null && $this->proxyConfig['mustmatch'] == true || $this->proxyConfig['mustmatch'] == "true") { if ($this->isAllowedApplication() == false) { $this->allowedApplicationError(); } $this->verifyConfiguration(); if ($this->meter->underMeterCap()) { $this->runProxy(); } else { $this->rateMeterExceededError(); } } else { if ($this->proxyConfig['mustmatch'] != null && $this->proxyConfig['mustmatch'] == false) { $this->runProxy(); } else { $this->configurationParameterError(); } } }
public function __construct($configuration, $log, $proxyDataValid) { $this->proxyLog = $log; $this->proxyConfig = $configuration->proxyConfig; $this->serverUrls = $configuration->serverUrls; $this->setupSession(); $this->getIncomingHeaders(); $this->setupClassProperties(); $this->checkEmptyParameters(); $this->checkForPing(); if (isset($this->proxyConfig['mustmatch']) && $this->proxyConfig['mustmatch'] === true || $this->proxyConfig['mustmatch'] === "true") { if ($this->isAllowedApplication() == false) { $this->allowedApplicationError(); } $this->verifyConfiguration(); if (isset($this->hostRedirect)) { $this->proxyUrlWithData = $this->redirect($this->proxyUrlWithData, $this->sessionUrl, $this->hostRedirect); $this->proxyUrl = $this->redirect($this->proxyUrl, $this->sessionUrl, $this->hostRedirect); } if ($this->meter->underMeterCap()) { $this->runProxy(); } else { $this->rateMeterExceededError(); } } else { if (isset($this->proxyConfig['mustmatch']) && $this->proxyConfig['mustmatch'] === false || $this->proxyConfig['mustmatch'] === "false") { $this->runProxy(); } else { $this->configurationParameterError(); } } }