Various formatting fixes

This commit is contained in:
Timothy Warren 2011-12-29 11:24:10 -05:00
parent dda867c208
commit a91b2a414e
3 changed files with 41 additions and 45 deletions

View File

@ -9,7 +9,8 @@ class db extends PDO {
public static function get_instance() public static function get_instance()
{ {
if ( ! isset(self::$instance)) { if ( ! isset(self::$instance))
{
echo 'Creating new instance of db class.'; echo 'Creating new instance of db class.';
$className = __CLASS__; $className = __CLASS__;
self::$instance = new $className; self::$instance = new $className;

View File

@ -7,9 +7,6 @@ class miniMVC{
private static $instance; private static $instance;
private static $count; private static $count;
//var $output = new Output;
//var $page = new Page;
public static function get_instance() public static function get_instance()
{ {
if( ! isset(self::$count)) if( ! isset(self::$count))

View File

@ -41,8 +41,6 @@ class Page
private function _headers($xhtml, $html5) private function _headers($xhtml, $html5)
{ {
$this->mm->output->set_header("Cache-Control", "must-revalidate, public"); $this->mm->output->set_header("Cache-Control", "must-revalidate, public");
$this->mm->output->set_header("Vary", "Accept");
$mime = ""; $mime = "";
//Variable for accept keyword //Variable for accept keyword
@ -100,9 +98,9 @@ class Page
$doctype_string = ''; $doctype_string = '';
} }
$doctype_string = "<?xml version='1.0' encoding='$charset' ?>\n" $doctype_string = "<?xml version='1.0' encoding='$charset' ?>"
. $doctype_string . $doctype_string
. "\n<html xmlns='http://www.w3.org/1999/xhtml'" . " xml:lang='en'>"; . "<html xmlns='http://www.w3.org/1999/xhtml'" . " xml:lang='en'>";
} }
else else
{ {
@ -321,7 +319,7 @@ class Page
*/ */
public function set_head_tag($tag) public function set_head_tag($tag)
{ {
$this->head_tags .= $tag . "\n"; $this->head_tags .= $tag;
return $this; return $this;
} }
@ -470,7 +468,7 @@ class Page
function render($view, $data=array()) function render($view, $data=array())
{ {
$this->build_header(); $this->build_header();
$this->load_view($view, $data); $this->mm->load_view($view, $data);
$this->build_footer(); $this->build_footer();
} }