1 | <?php |
||
7 | class PHPHtmlDomImportHtml |
||
8 | { |
||
9 | /** |
||
10 | * contexto de flujo. |
||
11 | * @var resource |
||
12 | */ |
||
13 | private $context; |
||
14 | |||
15 | /** |
||
16 | * Opcionees del contexto de flujo |
||
17 | * @var array |
||
18 | */ |
||
19 | private $context_options = array('http'=>array('method'=>"GET",'timout'=> 6,'ignore_errors' => true)); |
||
20 | |||
21 | public function __construct() |
||
25 | |||
26 | /** |
||
27 | * Este metodo permite importar el contenido proveniente de una url, path o texto. |
||
28 | * @param string $content Cadena de texto con la url, path o texto html. |
||
29 | * @return string|boolean Devuelve el contenido importado si el mismo tiene formato html o False en caso contrario. |
||
30 | */ |
||
31 | final public function import($content) |
||
41 | |||
42 | /** |
||
43 | * Este metodo permite validar si una cadena de texto efectivamente es texto html. |
||
44 | * @param string $str Cadena de texto a evaluar. |
||
45 | * @return boolean |
||
46 | */ |
||
47 | private function isStringHtml($str) |
||
51 | } |