PHP Class Proxy\Html

Mostrar archivo Open project: athlon1600/php-proxy Class Usage Examples

Public Methods

Method Description
extract_inner ( $selector, $html )
extract_outer ( $selector, $html )
remove ( $selector, $html )
remove_comments ( $html )
remove_scripts ( $html ) * $outputSource = preg_replace("/><\/(area|base|br|col|command|embed|hr|img|input|link|meta|param|source)>/", " />", $outputSource); $html = mb_eregi_replace("", '', $html); remove white space before closing tags $html = mb_eregi_replace("'\s+>", "'>", $html); $html = mb_eregi_replace('"\s+>', '">', $html);
remove_styles ( $html )
replace_inner ( $selector, $replace, $html, &$matches = NULL )
replace_outer ( $selector, $replace, $html, &$matches = NULL )

Private Methods

Method Description
extract ( $selector, $html, $inner = false )
find ( $selector, $html, $start_from )
replace ( $selector, $replace, $html, $replace_inner = false, &$matches = NULL )

Method Details

extract_inner() public static method

public static extract_inner ( $selector, $html )

extract_outer() public static method

public static extract_outer ( $selector, $html )

remove() public static method

public static remove ( $selector, $html )

remove_comments() public static method

public static remove_comments ( $html )

remove_scripts() public static method

* $outputSource = preg_replace("/><\/(area|base|br|col|command|embed|hr|img|input|link|meta|param|source)>/", " />", $outputSource); $html = mb_eregi_replace("", '', $html); remove white space before closing tags $html = mb_eregi_replace("'\s+>", "'>", $html); $html = mb_eregi_replace('"\s+>', '">', $html);
public static remove_scripts ( $html )

remove_styles() public static method

public static remove_styles ( $html )

replace_inner() public static method

public static replace_inner ( $selector, $replace, $html, &$matches = NULL )

replace_outer() public static method

public static replace_outer ( $selector, $replace, $html, &$matches = NULL )