diff Page.inc @ 93:8aadd7a23b68

Moved some functionality from common-functions into Http class. Reorganized Validator into a class hierarchy. Added functionality for validating with a buffer in addition to URLs.
author Tom Fredrik "BFG" Klaussen <bfg@blenning.no>
date Thu, 18 Oct 2012 16:44:48 +0200
parents 1d4c980f4255
children 2370f4450983
line wrap: on
line diff
--- a/Page.inc	Thu Oct 18 14:04:19 2012 +0200
+++ b/Page.inc	Thu Oct 18 16:44:48 2012 +0200
@@ -4,8 +4,8 @@
 /// @cond
 $baseDir = dirname(__FILE__);
 $cache = ScriptIncludeCache::instance(__FILE__);
+$cache->includeOnce('OnlineBufferValidator.inc', $baseDir);
 $cache->includeOnce('Options.inc', $baseDir);
-$cache->includeOnce('Validator.inc', $baseDir);
 /// @endcond
 
 class PageContent
@@ -139,8 +139,11 @@
     }
     $res = $this->generateContent();
     if ($this->mayValidate()) {
+      /*
       $request = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
-      $validator = new Validator($request);
+      $validator = new OnlineUriValidator($request);
+      */
+      $validator = new OnlineBufferValidator($res);
       if (!$validator->check())
 	throw new LogicException('The page could be generated, but contained errors');
     }