Proxy\Html::replace_inner PHP Method

replace_inner() public static method

public static replace_inner ( $selector, $replace, $html, &$matches = NULL )
    public static function replace_inner($selector, $replace, $html, &$matches = NULL)
    {
        return self::replace($selector, $replace, $html, true, $matches);
    }

Usage Example

示例#1
0
 public function onCompleted(ProxyEvent $event)
 {
     $response = $event['response'];
     $html = $response->getContent();
     if (preg_match('@flv_url=([^&]+)@', $html, $matches)) {
         $flv_url = rawurldecode($matches[1]);
         $player = vid_player($flv_url, 938, 476);
         // insert our own video player
         $html = Html::replace_inner("#video-player-bg", $player, $html);
         $response->setContent($html);
     }
 }
All Usage Examples Of Proxy\Html::replace_inner