/** * Constructor */ public function __construct(Configuration $configuration, $line, $position, $name, array $attributes = array()) { parent::__construct($configuration, $line, $position); $this->attributes = array(); foreach ($attributes as $key => $value) { $this->addAttribute($key, $value); } $this->children = array(); if (!is_string($name)) { throw new \InvalidArgumentException('Element name must be string type.'); } $this->name = trim(strtolower($name)); }
/** * Constructor */ public function __construct(Configuration $configuration, $line, $position, $value = null) { parent::__construct($configuration, $line, $position); $this->value = $value; }