[Cs-webapplibs-commits] SF.net SVN: cs-webapplibs:[143] trunk/0.3
Status: Beta
Brought to you by:
crazedsanity
|
From: <cra...@us...> - 2009-08-27 16:43:06
|
Revision: 143
http://cs-webapplibs.svn.sourceforge.net/cs-webapplibs/?rev=143&view=rev
Author: crazedsanity
Date: 2009-08-27 16:43:00 +0000 (Thu, 27 Aug 2009)
Log Message:
-----------
Update main abstract class to handle cs_globalFunctions & cs_versionParse stuff.
/cs_authToken.class.php:
* MAIN:::
-- set gfObj as protected (not private)
* __construct():
-- call parent::__construct() (creates gfObj).
/cs_bbCodeParser.class.php:
* MAIN:::
-- extends cs_webapplibsAbstract instead of cs_contentAbstract.
/cs_phpDB.class.php:
* MAIN:::
-- extends cs_webapplibsAbstract instead of cs_contentAbstract.
* __construct():
-- call parent::__construct() (creates gfObj).
/cs_siteConfig.class.php:
* MAIN:::
-- require cs_webapplibsAbstract class file.
-- extend cs_webapplibsAbstract instead of cs_contentAbstract
/cs_tabs.class.php:
* __construct():
-- call parent::__construct().
/cs_webdblogger.class.php:
* __construct():
-- call parent::__construct()
-- don't create cs_globalFunctions object (parent does that)
/cs_webdbupgrade.class.php:
* __construct():
-- call parent::__construct()
-- don't create cs_globalFunctions object (parent does that)
/abstract/cs_webapplibs.abstract.class.php:
* MAIN:::
-- don't require cs_contentAbstract
-- new var, protected $gfObj
* __construct() [NEW]:
-- do all the stuff required to use cs_versionAbstract
-- create gfObj (according to constructor arg #1)
Modified Paths:
--------------
trunk/0.3/abstract/cs_webapplibs.abstract.class.php
trunk/0.3/cs_authToken.class.php
trunk/0.3/cs_bbCodeParser.class.php
trunk/0.3/cs_phpDB.class.php
trunk/0.3/cs_siteConfig.class.php
trunk/0.3/cs_tabs.class.php
trunk/0.3/cs_webdblogger.class.php
trunk/0.3/cs_webdbupgrade.class.php
Modified: trunk/0.3/abstract/cs_webapplibs.abstract.class.php
===================================================================
--- trunk/0.3/abstract/cs_webapplibs.abstract.class.php 2009-08-26 17:50:33 UTC (rev 142)
+++ trunk/0.3/abstract/cs_webapplibs.abstract.class.php 2009-08-27 16:43:00 UTC (rev 143)
@@ -10,11 +10,24 @@
* Last Updated:::::::: $Date$
*/
-require_once(dirname(__FILE__) .'/../../cs-content/abstract/cs_content.abstract.class.php');
-
-
-abstract class cs_webapplibsAbstract extends cs_contentAbstract {
+abstract class cs_webapplibsAbstract extends cs_versionAbstract {
+ protected $gfObj;
+
+ //-------------------------------------------------------------------------
+ function __construct($makeGfObj=true) {
+ $this->set_version_file_location(dirname(__FILE__) . '/../VERSION');
+ $this->get_version();
+ $this->get_project();
+
+ if($makeGfObj === true) {
+ //make a cs_globalFunctions{} object.
+ //TODO::: find a way to avoid h
+ require_once(dirname(__FILE__) ."/../../cs-content/cs_globalFunctions.class.php");
+ $this->gfObj = new cs_globalFunctions();
+ }
+ }//end __construct()
+ //-------------------------------------------------------------------------
}
?>
Modified: trunk/0.3/cs_authToken.class.php
===================================================================
--- trunk/0.3/cs_authToken.class.php 2009-08-26 17:50:33 UTC (rev 142)
+++ trunk/0.3/cs_authToken.class.php 2009-08-27 16:43:00 UTC (rev 143)
@@ -19,7 +19,7 @@
private $db;
/** Object that helps deal with strings. */
- private $gfObj;
+ protected $gfObj;
/** Name of the table */
private $table = 'cswal_auth_token_table';
@@ -39,7 +39,7 @@
else {
throw new exception(__METHOD__ .": database object not connected");
}
- $this->gfObj = new cs_globalFunctions();
+ parent::__construct(true);
$upg = new cs_webdbupgrade(dirname(__FILE__) .'/VERSION', dirname(__FILE__) .'/upgrades/upgrade.xml');
$upg->check_versions(true);
Modified: trunk/0.3/cs_bbCodeParser.class.php
===================================================================
--- trunk/0.3/cs_bbCodeParser.class.php 2009-08-26 17:50:33 UTC (rev 142)
+++ trunk/0.3/cs_bbCodeParser.class.php 2009-08-27 16:43:00 UTC (rev 143)
@@ -20,7 +20,7 @@
require_once(dirname(__FILE__) ."/abstract/cs_webapplibs.abstract.class.php");
-class cs_bbCodeParser extends cs_webAppLibsAbstract {
+class cs_bbCodeParser extends cs_webapplibsAbstract {
/** Array containing all the codes & how to parse them. */
private $bbCodeData = NULL;
Modified: trunk/0.3/cs_phpDB.class.php
===================================================================
--- trunk/0.3/cs_phpDB.class.php 2009-08-26 17:50:33 UTC (rev 142)
+++ trunk/0.3/cs_phpDB.class.php 2009-08-27 16:43:00 UTC (rev 143)
@@ -27,11 +27,12 @@
require_once(dirname(__FILE__) ."/abstract/cs_webapplibs.abstract.class.php");
require_once(dirname(__FILE__) ."/abstract/cs_phpDB.abstract.class.php");
-class cs_phpDB extends cs_webAppLibsAbstract {
+class cs_phpDB extends cs_webapplibsAbstract {
private $dbLayerObj;
private $dbType;
public $connectParams = array();
+ protected $gfObj;
//=========================================================================
public function __construct($type='pgsql') {
@@ -43,7 +44,7 @@
$this->dbLayerObj = new $className;
$this->dbType = $type;
- parent::__construct();
+ parent::__construct(true);
$this->isInitialized = TRUE;
}
Modified: trunk/0.3/cs_siteConfig.class.php
===================================================================
--- trunk/0.3/cs_siteConfig.class.php 2009-08-26 17:50:33 UTC (rev 142)
+++ trunk/0.3/cs_siteConfig.class.php 2009-08-27 16:43:00 UTC (rev 143)
@@ -20,7 +20,7 @@
require_once(dirname(__FILE__). '/../cs-phpxml/cs_phpxmlParser.class.php');
require_once(dirname(__FILE__) .'/../cs-phpxml/cs_phpxmlBuilder.class.php');
-class cs_siteConfig extends cs_webAppLibsAbstract {
+class cs_siteConfig extends cs_webapplibsAbstract {
/** XMLParser{} object, for reading XML config file. */
private $xmlReader;
Modified: trunk/0.3/cs_tabs.class.php
===================================================================
--- trunk/0.3/cs_tabs.class.php 2009-08-26 17:50:33 UTC (rev 142)
+++ trunk/0.3/cs_tabs.class.php 2009-08-27 16:43:00 UTC (rev 143)
@@ -38,6 +38,7 @@
//set the internal var.
$this->templateVar = $templateVar;
}
+ parent::__construct();
$this->gfObj = new cs_globalFunctions;
}//end __construct()
Modified: trunk/0.3/cs_webdblogger.class.php
===================================================================
--- trunk/0.3/cs_webdblogger.class.php 2009-08-26 17:50:33 UTC (rev 142)
+++ trunk/0.3/cs_webdblogger.class.php 2009-08-27 16:43:00 UTC (rev 143)
@@ -99,7 +99,7 @@
throw new exception(__METHOD__ .": requires cs_phpDB of higher than v". $mustBeHigherThan,1);
}
- $this->gfObj = new cs_globalFunctions;
+ parent::__construct(true);
//see if there's an upgrade to perform...
if($checkForUpgrades === true) {
Modified: trunk/0.3/cs_webdbupgrade.class.php
===================================================================
--- trunk/0.3/cs_webdbupgrade.class.php 2009-08-26 17:50:33 UTC (rev 142)
+++ trunk/0.3/cs_webdbupgrade.class.php 2009-08-27 16:43:00 UTC (rev 143)
@@ -94,7 +94,7 @@
require_once(constant('LIBDIR') .'/cs-phpxml/cs_arrayToPath.class.php');
$this->fsObj = new cs_fileSystem(constant('SITE_ROOT'));
- $this->gfObj = new cs_globalFunctions;
+ parent::__construct(true);
if(defined('DEBUGPRINTOPT')) {
$this->gfObj->debugPrintOpt = constant('DEBUGPRINTOPT');
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|