Private/Polyfony/Element.php
public function setStyle(array $css_properties=[]) :self {
		// init the style attribute is it didn't exist already
		isset($this->attributes['style']) ?: $this->attributes['style'] = '';
		// for each of the css properties
		foreach($css_properties as $css_property => $css_value) {
			// add them to the already existing ones
			$this->attributes['style'] .= $css_property.':'.$css_value.';';
		}
		// return self
		return($this);
	}
public function setStyle(array $css_properties=[]) :self {
		// init the style attribute is it didn't exist already
		isset($this->attributes['style']) ?: $this->attributes['style'] = '';
		// for each of the css properties
		foreach($css_properties as $css_property => $css_value) {
			// add them to the already existing ones
			$this->attributes['style'] .= $css_property.':'.$css_value.';';
		}
		// return self
		return($this);
	}
public function setStyle ( array $ css_properties = [ ] ) : self { // init the style attribute is it didn't exist already isset ( $ this -> attributes [ 'style' ] ) ? : $ this -> attributes [ 'style' ] = '' ; // for each of the css properties foreach ( $ css_properties as $ css_property => $ css_value ) { // add them to the already existing ones $ this -> attributes [ 'style' ] .= $ css_property . ':' . $ css_value . ';' ; } // return self return ( $ this ) ; }
set the style for the tag
set the style for the tag