Permalink
Browse files

Fixed typos, inline docs, minor ws (Laurent)

git-svn-id: http://svn.php.net/repository/pear/packages/HTML_Page/trunk@143651 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent f1fdb19 commit e965a320e155a473db1613276d3a1e3497811d3d Klaus Guenther committed Nov 3, 2003
Showing with 9 additions and 14 deletions.
  1. +7 −12 Page.php
  2. +2 −2 examples/Page_Complex.php
View
19 Page.php
@@ -93,7 +93,7 @@
* $p->setMetaData("author", "My Name");
*
* // Put something into the body
- * $p->addBodyContent = "<p>some text</p>";
+ * $p->addBodyContent("<p>some text</p>");
*
* // If at some point you want to clear the page content
* // and output an error message, you can easily do that
@@ -236,9 +236,9 @@ class HTML_Page extends HTML_Common {
var $_script = array();
/**
- * Array of linked scripts
+ * Defines whether doctype
*
- * @var array
+ * @var boolean
* @access private
*/
var $_simple = false;
@@ -295,11 +295,6 @@ class HTML_Page extends HTML_Common {
*/
function HTML_Page($attributes = array())
{
- $commonVersion = 1.7;
- if (HTML_Common::apiVersion() < $commonVersion) {
- return PEAR::raiseError("HTML_Page version " . $this->apiVersion() . " requires " .
- "HTML_Common version 1.2 or greater.", 0, PEAR_ERROR_TRIGGER);
- }
if ($attributes) {
$attributes = $this->_parseAttributes($attributes);
@@ -445,7 +440,7 @@ function _generateHead()
// Generate stylesheet links
foreach ($this->_styleSheets as $strSrc => $strAttr ) {
$strHtml .= $tab . "<link rel=\"stylesheet\" href=\"$strSrc\" type=\"".$strAttr['mime'].'"';
- if (!is_null($strType['media'])){
+ if (!is_null($strAttr['media'])){
$strHtml .= ' media="'.$strAttr['media'].'"';
}
$strHtml .= $tagEnd . $lnEnd;
@@ -803,7 +798,7 @@ function getCharset()
/**
* Returns the document type string
*
- * @access private
+ * @access public
* @return string
*/
function getDoctypeString()
@@ -822,7 +817,7 @@ function getDoctypeString()
* @return string
* @access public
*/
- function getLang ()
+ function getLang()
{
return $this->_language;
} // end func getLang
@@ -1020,7 +1015,7 @@ function setTitle($title)
* Generates and returns the complete page as a string.
*
* @return string
- * @access private
+ * @access public
*/
function toHTML()
{
View
4 examples/Page_Complex.php
@@ -59,7 +59,7 @@
'cache' => 'false'
));
-// Page title defaults to "New XHTML 1.0 Page"
+// Page title defaults to "New XHTML 1.0 Strict Page"
$p->setTitle("HTML_Page Color Chart example");
$p->setMetaData("author", "Klaus Guenther");
@@ -69,7 +69,7 @@
$p->addBodyContent("<h1>Color Chart</h1>");
// Objects with toHtml and toString are supported.
-$p->addBodyContent(&$table);
+$p->addBodyContent($table);
$p->addBodyContent('<p>Copyright 2003 The PHP Group</p>');
// output to browser

0 comments on commit e965a32

Please sign in to comment.