You are here

public function CasPropertyBag::getAttribute in CAS 8

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

Returns a single attribute if exists.

Parameters

string $name: The name of the attribute.

Return value

mixed|null The attribute value, or NULL if it does not exist.

File

src/CasPropertyBag.php, line 140

Class

CasPropertyBag
Class CasPropertyBag.

Namespace

Drupal\cas

Code

public function getAttribute($name) {
  return $this
    ->hasAttribute($name) ? $this->attributes[$name] : NULL;
}