public function DumperCollection::getAttribute

Returns an attribute by name.

Parameters

string $name The attribute name:

mixed $default Default value is the attribute doesn't exist:

Return value

mixed The attribute value

File

drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/DumperCollection.php, line 134

Class

DumperCollection
Collection of routes.

Namespace

Symfony\Component\Routing\Matcher\Dumper

Code

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