I have this class in PHP that I created:
class MasterPhpPage
{
private $_docType;
private $_getParameters;
private $_pageName;
private $_postParameters;
private $_pageLabel;
private $_pageContentFileName;
public function __construct($docType, $pageName, $pageLabel,
$pageContentFileName)
{
$_docType = $docType;
$_getParameters = $_GET;
$_pageName = $pageName;
$_postParameters = $_POST;
$_pageLabel = $pageLabel;
$_pageContentFileName = $pageContentFileName;
}
public function getDocType()
{
return $this->_docType;
}
public function pageName()
{
echo $this->_pageName;
}
public function getPageName()
{
return $this->_pageName;
}
public function pageLabel()
{
echo $this->_pageLabel;
}
public function getPageLabel()
{
return $this->_pageLabel;
}
public function pageContentFileName()
{
echo $this->_pageContentFileName;
}
public function getPageContentFileName()
{
return $this->_pageContentFileName;
}
public function getPostParamater($key)
{
return $this->_postParameters[$key];
}
public function getGetParameter($key)
{
return $this->_getParameters[$key];
}
public function setHeader($key, $value)
{
header($key." ".$value);
}
public function redirectTo($location)
{
header("Location: ".$location);
}
}
And for some reason, this doesn't work the way I would expect it to:
$masterPage = new MasterPhpPage('_snippets/__xhtmlTransitionalDTD.php',
'index.php', 'Home | Nathandelane', 'pages/homepage.php');
require_once($masterPage->getDocType());
Where the contents of '_snippets/__xhtmlTransitionalDTD.php' are simply:
<?php
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd">';
?>
Instead I get a file not found for the
'_snippets/__xhtmlTransitionalDTD.php' file. Can anybody help me?
--
Nathan Lane
Home, http://www.nathandelane.com
Blog, http://nathandelane.blogspot.com
_______________________________________________
UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net