libs/Parser/Node/TagNode.php
protected function setAttribute( string$key, string$value, string$condition=null ):self
	{
		if( isset($this->attributes[$key]) )
			{ $this->document->throw("Attribute $key of $this->name cannot redeclare."); }

		$this->attributes[$key]=[
			'value'=> $value,
			'condition'=> $condition,
		];

		return $this;
	}
protected function setAttribute( string$key, string$value, string$condition=null ):self
	{
		if( isset($this->attributes[$key]) )
			{ $this->document->throw("Attribute $key of $this->name cannot redeclare."); }

		$this->attributes[$key]=[
			'value'=> $value,
			'condition'=> $condition,
		];

		return $this;
	}
protected function setAttribute ( string $ key , string $ value , string $ condition = null ) : self { if ( isset ( $ this -> attributes [ $ key ] ) ) { $ this -> document -> throw ( "Attribute $key of $this->name cannot redeclare." ) ; } $ this -> attributes [ $ key ] = [ 'value' => $ value , 'condition' => $ condition , ] ; return $ this ; }
Setting attribute.

@access protected

@param string      $key       Attribute name.
@param string      $value     Attribute value
@param string|null $condition Optional condition, If given, attribute will seted only when condition is true.
Setting attribute .