* * This script is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * The GNU General Public License can be found at * http://www.gnu.org/copyleft/gpl.html. * * This script is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ namespace Html2Text; class Html2Text { const ENCODING = 'UTF-8'; protected $htmlFuncFlags; /** * Contains the HTML content to convert. * * @type string */ protected $html; /** * Contains the converted, formatted text. * * @type string */ protected $text; /** * List of preg* regular expression patterns to search for, * used in conjunction with $replace. * * @type array * @see $replace */ protected $search = array( "/\r/", // Non-legal carriage return "/[\n\t]+/", // Newlines and tabs '/
]*>.*?<\/head>/i', // '/