includes/Parser.php
public function addMfClasses(DOMElement $el, $classes) {
		$existingClasses = str_replace(array("\t", "\n"), ' ', $el->getAttribute('class'));
		$existingClasses = array_filter(explode(' ', $existingClasses));

		$addClasses = array_diff(explode(' ', $classes), $existingClasses);

		if ( $addClasses ) {
			$el->setAttribute('class', $el->getAttribute('class') . ' ' . implode(' ', $addClasses));
		}
	}
public function addMfClasses(DOMElement $el, $classes) {
		$existingClasses = str_replace(array("\t", "\n"), ' ', $el->getAttribute('class'));
		$existingClasses = array_filter(explode(' ', $existingClasses));

		$addClasses = array_diff(explode(' ', $classes), $existingClasses);

		if ( $addClasses ) {
			$el->setAttribute('class', $el->getAttribute('class') . ' ' . implode(' ', $addClasses));
		}
	}
public function addMfClasses ( DOMElement $ el , $ classes ) { $ existingClasses = str_replace ( array ( "\t" , "\n" ) , ' ' , $ el -> getAttribute ( 'class' ) ) ; $ existingClasses = array_filter ( explode ( ' ' , $ existingClasses ) ) ; $ addClasses = array_diff ( explode ( ' ' , $ classes ) , $ existingClasses ) ; if ( $ addClasses ) { $ el -> setAttribute ( 'class' , $ el -> getAttribute ( 'class' ) . ' ' . implode ( ' ' , $ addClasses ) ) ; } }
Add the provided classes to an element.
Does not add duplicate if class name already exists.
@param DOMElement $el
@param string $classes
Add the provided classes to an element . Does not add duplicate if class name already exists .