public function generateMarkup(string $attribute, string $content) : string
    {
        // Substitute tag name, attribute value and text content in the output string.
        return preg_replace_callback('/{(\w+)}/', function ($matches) use ($attribute, $content) {
            switch ($matches[1]) {
                case 'name':
                    return $this->tagName;

                case 'attribute':
                    return $attribute;

                case 'content':
                    return $content;

                default:
                    return $matches[0];
            }
        }, $this->outputFormat);
    }
public function generateMarkup(string $attribute, string $content) : string
    {
        // Substitute tag name, attribute value and text content in the output string.
        return preg_replace_callback('/{(\w+)}/', function ($matches) use ($attribute, $content) {
            switch ($matches[1]) {
                case 'name':
                    return $this->tagName;

                case 'attribute':
                    return $attribute;

                case 'content':
                    return $content;

                default:
                    return $matches[0];
            }
        }, $this->outputFormat);
    }
public function generateMarkup ( string $ attribute , string $ content ) : string { // Substitute tag name, attribute value and text content in the output string. return preg_replace_callback ( '/{(\w+)}/' , function ( $ matches ) use ( $ attribute , $ content ) { switch ( $ matches [ 1 ] ) { case 'name' : return $ this -> tagName ; case 'attribute' : return $ attribute ; case 'content' : return $ content ; default : return $ matches [ 0 ] ; } } , $ this -> outputFormat ) ; }
Generates markup string for specified tag attribute and inner text.

@param string $content Inner content of the tag.
@param string $attribute Attribute value of the tag.

@return string
Generates markup string for specified tag attribute and inner text .