public function getAttributes()
    {
        $ret = array();

        if (count($this->attributes)) {
            foreach ($this->attributes as $name => $value) {
                $ret[] = sprintf($name . '="%s"', $value);
            }
        }

        if (count($this->varAttr)) {
            foreach ($this->varAttr as $name => $value) {
                $ret[] = sprintf($name . '="%s"', $value);
            }
        }

        if (strlen($className = $this->getClassName())) {
            $ret[] = sprintf('class="%s"', $className);
        }
        return ' ' . implode(' ', $ret);
    }
public function getAttributes()
    {
        $ret = array();

        if (count($this->attributes)) {
            foreach ($this->attributes as $name => $value) {
                $ret[] = sprintf($name . '="%s"', $value);
            }
        }

        if (count($this->varAttr)) {
            foreach ($this->varAttr as $name => $value) {
                $ret[] = sprintf($name . '="%s"', $value);
            }
        }

        if (strlen($className = $this->getClassName())) {
            $ret[] = sprintf('class="%s"', $className);
        }
        return ' ' . implode(' ', $ret);
    }
public function getAttributes ( ) { $ ret = array ( ) ; if ( count ( $ this -> attributes ) ) { foreach ( $ this -> attributes as $ name => $ value ) { $ ret [ ] = sprintf ( $ name . '="%s"' , $ value ) ; } } if ( count ( $ this -> varAttr ) ) { foreach ( $ this -> varAttr as $ name => $ value ) { $ ret [ ] = sprintf ( $ name . '="%s"' , $ value ) ; } } if ( strlen ( $ className = $ this -> getClassName ( ) ) ) { $ ret [ ] = sprintf ( 'class="%s"' , $ className ) ; } return ' ' . implode ( ' ' , $ ret ) ; }
Get attributes as a string

@return null|string
Get attributes as a string