X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/e77639a0e0e540810a85ff7db40ec17629636e4a..8399c82585dd6480fe3bfda4aee22b7e6a6a131a:/pear_lib_tmp/HTML/Page.php?ds=inline diff --git a/pear_lib_tmp/HTML/Page.php b/pear_lib_tmp/HTML/Page.php index 801ffab..2e32634 100644 --- a/pear_lib_tmp/HTML/Page.php +++ b/pear_lib_tmp/HTML/Page.php @@ -5,10 +5,10 @@ // +----------------------------------------------------------------------+ // | Copyright (c) 1997 - 2003 The PHP Group | // +----------------------------------------------------------------------+ -// | This source file is subject to version 2.0 of the PHP license, | +// | This source file is subject to version 3.0 of the PHP license, | // | that is bundled with this package in the file LICENSE, and is | // | available at through the world-wide-web at | -// | http://www.php.net/license/2_02.txt. | +// | http://www.php.net/license/3_0.txt. | // | If you did not receive a copy of the PHP license and are unable to | // | obtain it through the world-wide-web, please send a note to | // | license@php.net so we can mail you a copy immediately. | @@ -17,9 +17,11 @@ // | Klaus Guenther | // +----------------------------------------------------------------------+ // +// $Id$ require_once 'PEAR.php'; -require_once 'Common.php'; +require_once 'HTML/Common.php'; +// HTML/Page/Doctypes.php is required in _getDoctype() /** * Base class for XHTML pages @@ -59,6 +61,7 @@ require_once 'Common.php'; * $p = new HTML_Page(array ( * * // Sets the charset encoding + * // utf-8 is default * 'charset' => 'utf-8', * * // Sets the line end character @@ -112,7 +115,7 @@ require_once 'Common.php'; * // An XHTML compliant page (with title) is automatically generated * * // This overrides the XHTML 1.0 Transitional default - * $p->setDoctype('xhtml'); + * $p->setDoctype('XHTML 1.0 Strict'); * * // Put some content in here * $p->addBodyContent("

some text

"); @@ -143,7 +146,7 @@ require_once 'Common.php'; * * @author Adam Daniel * @author Klaus Guenther - * @version 0.8b2 + * @version 2.0 * @since PHP 4.0.3pl1 */ class HTML_Page extends HTML_Common { @@ -257,8 +260,7 @@ class HTML_Page extends HTML_Common { $commonVersion = 1.7; if (HTML_Common::apiVersion() < $commonVersion) { return PEAR::raiseError("HTML_Page version " . $this->apiVersion() . " requires " . - "HTML_Common version $commonVersion or greater. You can get the (still) unofficial ". - "update here: http://www.geist.uni-freiburg.de/pear/HTML/Common.txt", 0, PEAR_ERROR_TRIGGER); + "HTML_Common version 1.2 or greater.", 0, PEAR_ERROR_TRIGGER); } if ($attributes) { @@ -357,22 +359,6 @@ class HTML_Page extends HTML_Common { return $strHtml; } // end func _generateHead - /** - * Outputs a page containing the error message and then dies - * - * @return void - * @access private - */ - function _error(&$error){ - - $this->setTitle('HTML_Page doctype Error'); - $this->setBody('

' . $error->getMessage() . '

'); - $this->setDoctype(); - $this->display(); - die; - - } // - /** * Generates the HTML string for the <head< tag * @@ -401,7 +387,8 @@ class HTML_Page extends HTML_Common { } // Generate stylesheet links - for($intCounter=0; $intCounter_styleSheets); $intCounter++) { + $count = count($this->_styleSheets); + for($intCounter=0; $intCounter < $count; $intCounter++) { $strStyleSheet = $this->_styleSheets[$intCounter]; $strHtml .= $tab . "" . $lnEnd; } @@ -411,14 +398,22 @@ class HTML_Page extends HTML_Common { $strHtml .= $tab . '