src/PHPHtmlParser/Dom/Tag.php
public function makeOpeningTag()
    {
        $return = '<'.$this->name;

        // add the attributes
        foreach ($this->attr as $key => $info) {
            $info = $this->getAttribute($key);
            $val  = $info['value'];
            if (is_null($val)) {
                $return .= ' '.$key;
            } elseif ($info['doubleQuote']) {
                $return .= ' '.$key.'="'.$val.'"';
            } else {
                $return .= ' '.$key.'=\''.$val.'\'';
            }
        }

        if ($this->selfClosing && $this->trailingSlash) {
            return $return.' />';
        } else {
            return $return.'>';
        }
    }
public function makeOpeningTag()
    {
        $return = '<'.$this->name;

        // add the attributes
        foreach ($this->attr as $key => $info) {
            $info = $this->getAttribute($key);
            $val  = $info['value'];
            if (is_null($val)) {
                $return .= ' '.$key;
            } elseif ($info['doubleQuote']) {
                $return .= ' '.$key.'="'.$val.'"';
            } else {
                $return .= ' '.$key.'=\''.$val.'\'';
            }
        }

        if ($this->selfClosing && $this->trailingSlash) {
            return $return.' />';
        } else {
            return $return.'>';
        }
    }
public function makeOpeningTag ( ) { $ return = '<' . $ this -> name ; // add the attributes foreach ( $ this -> attr as $ key => $ info ) { $ info = $ this -> getAttribute ( $ key ) ; $ val = $ info [ 'value' ] ; if ( is_null ( $ val ) ) { $ return .= ' ' . $ key ; } elseif ( $ info [ 'doubleQuote' ] ) { $ return .= ' ' . $ key . '="' . $ val . '"' ; } else { $ return .= ' ' . $ key . '=\'' . $ val . '\'' ; } } if ( $ this -> selfClosing && $ this -> trailingSlash ) { return $ return . ' />' ; } else { return $ return . '>' ; } }
Generates the opening tag for this object.

@return string
Generates the opening tag for this object .