You are here

public function CasPropertyBag::getAttribute in CAS 2.x

Same name and namespace in other branches
  1. 8 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
Data model for CAS property bag.

Namespace

Drupal\cas

Code

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