public function __toAttribute()
	{
		if ( $this->count() ) {
			$attr = null;

			if ( is_string( $this->attribute ) ) {
				$attr = $this->attribute;
			}
			elseif ( $this->attribute instanceof DOMAttr ) {
				$attr = $this->attribute->name;
			}

			if ( $attr ) {
				$values = htmlspecialchars((string) $this, ENT_QUOTES, ini_get('default_charset'), false);
				return sprintf('%1$s="%2$s"', $attr, $values);
			}
		}

		return '';
	}
public function __toAttribute()
	{
		if ( $this->count() ) {
			$attr = null;

			if ( is_string( $this->attribute ) ) {
				$attr = $this->attribute;
			}
			elseif ( $this->attribute instanceof DOMAttr ) {
				$attr = $this->attribute->name;
			}

			if ( $attr ) {
				$values = htmlspecialchars((string) $this, ENT_QUOTES, ini_get('default_charset'), false);
				return sprintf('%1$s="%2$s"', $attr, $values);
			}
		}

		return '';
	}
public function __toAttribute ( ) { if ( $ this -> count ( ) ) { $ attr = null ; if ( is_string ( $ this -> attribute ) ) { $ attr = $ this -> attribute ; } elseif ( $ this -> attribute instanceof DOMAttr ) { $ attr = $ this -> attribute -> name ; } if ( $ attr ) { $ values = htmlspecialchars ( ( string ) $ this , ENT_QUOTES , ini_get ( 'default_charset' ) , false ) ; return sprintf ( '%1$s="%2$s"' , $ attr , $ values ) ; } } return '' ; }
Retrieves the HTML attribute and concatenated list of the tokens.

@return string Stringified token list, wrapped in an HTML attribute.
Retrieves the HTML attribute and concatenated list of the tokens .