includes/class-parse-this.php
public function set( $source_content, $url, $jf2 = false ) {
		$this->content = $source_content;
		if ( wp_http_validate_url( $url ) ) {
			$this->url    = $url;
			$this->domain = wp_parse_url( $url, PHP_URL_HOST );
		}
		if ( $jf2 ) {
			$this->jf2 = $source_content;
		} elseif ( is_string( $this->content ) ) {
			if ( class_exists( 'Masterminds\\HTML5' ) ) {
				$this->doc = new \Masterminds\HTML5( array( 'disable_html_ns' => true ) );
				$this->doc = $this->doc->loadHTML( $this->content );
			} else {
				$this->doc = new DOMDocument();
				libxml_use_internal_errors( true );
				$this->doc->loadHTML( mb_convert_encoding( $this->content, 'HTML-ENTITIES', mb_detect_encoding( $this->content ) ) );
				libxml_use_internal_errors( false );
			}
		}
	}
public function set( $source_content, $url, $jf2 = false ) {
		$this->content = $source_content;
		if ( wp_http_validate_url( $url ) ) {
			$this->url    = $url;
			$this->domain = wp_parse_url( $url, PHP_URL_HOST );
		}
		if ( $jf2 ) {
			$this->jf2 = $source_content;
		} elseif ( is_string( $this->content ) ) {
			if ( class_exists( 'Masterminds\\HTML5' ) ) {
				$this->doc = new \Masterminds\HTML5( array( 'disable_html_ns' => true ) );
				$this->doc = $this->doc->loadHTML( $this->content );
			} else {
				$this->doc = new DOMDocument();
				libxml_use_internal_errors( true );
				$this->doc->loadHTML( mb_convert_encoding( $this->content, 'HTML-ENTITIES', mb_detect_encoding( $this->content ) ) );
				libxml_use_internal_errors( false );
			}
		}
	}
public function set ( $ source_content , $ url , $ jf2 = false ) { $ this -> content = $ source_content ; if ( wp_http_validate_url ( $ url ) ) { $ this -> url = $ url ; $ this -> domain = wp_parse_url ( $ url , PHP_URL_HOST ) ; } if ( $ jf2 ) { $ this -> jf2 = $ source_content ; } elseif ( is_string ( $ this -> content ) ) { if ( class_exists ( 'Masterminds\\HTML5' ) ) { $ this -> doc = new \ Masterminds \ HTML5 ( array ( 'disable_html_ns' => true ) ) ; $ this -> doc = $ this -> doc -> loadHTML ( $ this -> content ) ; } else { $ this -> doc = new DOMDocument ( ) ; libxml_use_internal_errors ( true ) ; $ this -> doc -> loadHTML ( mb_convert_encoding ( $ this -> content , 'HTML-ENTITIES' , mb_detect_encoding ( $ this -> content ) ) ) ; libxml_use_internal_errors ( false ) ; } } }
Sets the source.

@since x.x.x
@access public

@param string $source_content source content.
@param string $url Source URL
@param string $jf2 If set it passes the content directly as preparsed
Sets the source .