You are here

public function CasRedirectData::setParameter in CAS 8

Same name and namespace in other branches
  1. 2.x src/CasRedirectData.php \Drupal\cas\CasRedirectData::setParameter()

Set a redirection parameter.

Sets a redirect parameter that will later be used in the redirection request. NULL values will cause the parameter to be unset, but not when they are required.

Parameters

string $key: Key of parameter to set.

mixed $value: Value of parramter to set.

File

src/CasRedirectData.php, line 82

Class

CasRedirectData
Class CasRedirectData.

Namespace

Drupal\cas

Code

public function setParameter($key, $value) {
  if (empty($value)) {
    unset($this->redirectParameters[$key]);
  }
  else {
    $this->redirectParameters[$key] = $value;
  }
}