From 84118290e2c8faa46741bac36a9c1ba9eafb2586 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 8 Oct 2005 04:31:44 +0000 Subject: [PATCH] Added registry connection plugs to the modules --- date.php | 10 +++++++++- db_mysql.php | 14 ++++++++++++++ functions.php | 14 ++++++++++++++ localize.php | 14 ++++++++++++++ mail.php | 14 ++++++++++++++ template.php | 14 ++++++++++++++ template_fs.php | 14 ++++++++++++++ xml.php | 14 ++++++++++++++ 8 files changed, 107 insertions(+), 1 deletion(-) diff --git a/date.php b/date.php index 14dc7d9..b246162 100644 --- a/date.php +++ b/date.php @@ -50,6 +50,12 @@ define('TIMENOW', time()); */ class Date_Formatter { + /** + * Framework registry object + * @var object + */ + var $registry = null; + /** * User timezone offset * @var integer @@ -77,8 +83,10 @@ class Date_Formatter /** * Constructor: sets the server's timezone */ - function Date_Formatter() + function Date_Formatter($registry) { + $this->registry = $registry; + $this->servertz = date('Z', TIMENOW) / 3600; } diff --git a/db_mysql.php b/db_mysql.php index 89e356b..ac35f6d 100644 --- a/db_mysql.php +++ b/db_mysql.php @@ -44,6 +44,12 @@ $OBJ = 'db'; */ class MySQL_Database_Driver { + /** + * Framework registry object + * @var object + */ + var $registry = null; + /** * Database that is used in the application * @var string @@ -92,6 +98,14 @@ class MySQL_Database_Driver */ var $history = array(); + /** + * Constructor + */ + function MySQL_Database_Driver($registry) + { + $this->registry = $registry; + } + /** * Connect to a the specified database * diff --git a/functions.php b/functions.php index a954ed8..a4bd197 100644 --- a/functions.php +++ b/functions.php @@ -44,6 +44,12 @@ $OBJ = 'funct'; */ class Functions { + /** + * Framework registry object + * @var object + */ + var $registry = null; + /** * The path that is used to set cookies * @var string @@ -68,6 +74,14 @@ class Functions */ var $bgcolour = ''; + /** + * Constructor + */ + function Functions($registry) + { + $this->registry = $registry; + } + /** * Sets a cookie with a friendly interface * diff --git a/localize.php b/localize.php index 8ecda2c..62b1202 100644 --- a/localize.php +++ b/localize.php @@ -49,6 +49,12 @@ $OBJ = 'lang'; */ class Localize { + /** + * Framework registry object + * @var object + */ + var $registry = null; + /** * Localization table * @var array @@ -61,6 +67,14 @@ class Localize */ var $lextable = array(); + /** + * Constructor + */ + function Localize($registry) + { + $this->registry = $registry; + } + /** * Initializes the localization system with a table * diff --git a/mail.php b/mail.php index 20df43a..ccaa64f 100644 --- a/mail.php +++ b/mail.php @@ -44,6 +44,12 @@ $OBJ = 'mail'; */ class Mail { + /** + * Framework registry object + * @var object + */ + var $registry = null; + /** * The message recipient's email address * @var string @@ -80,6 +86,14 @@ class Mail */ var $headers = ''; + /** + * Constructor + */ + function Mail($registry) + { + $this->registry = $registry; + } + /** * Sends an email to the specified address with the specified * sender, subject, and body. diff --git a/template.php b/template.php index d21d6f6..ab12bfc 100644 --- a/template.php +++ b/template.php @@ -44,6 +44,12 @@ $OBJ = 'template'; */ class DB_Template { + /** + * Framework registry object + * @var object + */ + var $registry = null; + /** * Name of the database table templates are in * @var string @@ -103,6 +109,14 @@ class DB_Template * @var bool */ var $doneflush = false; + + /** + * Constructor + */ + function DB_Template($registry) + { + $this->registry = $registry; + } /** * Takes an array of template names, loads them, and then stores diff --git a/template_fs.php b/template_fs.php index 0e5ad84..de7b7ca 100644 --- a/template_fs.php +++ b/template_fs.php @@ -49,6 +49,12 @@ $OBJ = 'template'; */ class FS_Template extends DB_Template { + /** + * Framework registry object + * @var object + */ + var $registry = null; + /** * The path, from the path of the application, where templates are stored * @var string @@ -61,6 +67,14 @@ class FS_Template extends DB_Template */ var $extension = 'tpl'; + /** + * Constructor + */ + function FS_Template($registry) + { + $this->registry = $registry; + } + /** * Takes an array of template names, loads them, and then stores * a parsed version for optimum speed. diff --git a/xml.php b/xml.php index e50038e..e189f83 100644 --- a/xml.php +++ b/xml.php @@ -43,6 +43,12 @@ $OBJ = 'xml'; */ class XML_Parser { + /** + * Framework registry object + * @var object + */ + var $registry = null; + /** * Parser resource * @var integer @@ -79,6 +85,14 @@ class XML_Parser */ var $result = array(); + /** + * Constructor + */ + function XML_Parser($registry) + { + $this->registry = $registry; + } + /** * Parse an XML file * -- 2.43.5