コード例 #1
0
ファイル: Element.php プロジェクト: kevintweber/groundskeeper
 /**
  * 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));
 }
コード例 #2
0
 /**
  * Constructor
  */
 public function __construct(Configuration $configuration, $line, $position, $value = null)
 {
     parent::__construct($configuration, $line, $position);
     $this->value = $value;
 }