getAttribute() public method

Get an attribute value
public getAttribute ( string $name ) : string
$name string
return string
Beispiel #1
0
 public function callAction(Element $element)
 {
     $url = Uri::createFromString($element->getAttribute('href'));
     $action = new Action($this, $url, $element);
     $params = explode(':', urldecode($url->getFragment()));
     array_shift($params);
     // slice away the needle
     $actionName = array_shift($params);
     $action->setParameters($params);
     $actions = $this->getLinkActions();
     if (array_key_exists($actionName, $actions)) {
         $config = $actions[$actionName];
         if (is_string($config)) {
             $config = ['call' => $config];
         }
         $action->setConfig($config);
         $action->call();
     }
 }