original_string: public function processHtml($html)
      {
          if (!is_string($html)) {
              return $html;
          }
  
          $mediaTags = $this->extractMediaTags($html);
          foreach ($mediaTags as $tagInfo) {
              $pattern = preg_quote($tagInfo['declaration']);
              $generatedMarkup = $this->generateMediaTagMarkup($tagInfo['type'], $tagInfo['src']);
              $html = mb_ereg_replace($pattern, $generatedMarkup, $html);
          }
  
          return $html;
      }
code: public function processHtml($html)
      {
          if (!is_string($html)) {
              return $html;
          }
  
          $mediaTags = $this->extractMediaTags($html);
          foreach ($mediaTags as $tagInfo) {
              $pattern = preg_quote($tagInfo['declaration']);
              $generatedMarkup = $this->generateMediaTagMarkup($tagInfo['type'], $tagInfo['src']);
              $html = mb_ereg_replace($pattern, $generatedMarkup, $html);
          }
  
          return $html;
      }
code_tokens: public function processHtml ( $ html ) { if ( ! is_string ( $ html ) ) { return $ html ; } $ mediaTags = $ this -> extractMediaTags ( $ html ) ; foreach ( $ mediaTags as $ tagInfo ) { $ pattern = preg_quote ( $ tagInfo [ 'declaration' ] ) ; $ generatedMarkup = $ this -> generateMediaTagMarkup ( $ tagInfo [ 'type' ] , $ tagInfo [ 'src' ] ) ; $ html = mb_ereg_replace ( $ pattern , $ generatedMarkup , $ html ) ; } return $ html ; }
docstring: Replaces audio and video tags inserted by the Media Manager with players markup.
  @param string $html Specifies the HTML string to process.
  @return string Returns the processed HTML string.
docstring_tokens: Replaces audio and video tags inserted by the Media Manager with players markup .