[Phpfreechat-svn] SF.net SVN: phpfreechat: [1056] trunk/src
Status: Beta
Brought to you by:
kerphi
|
From: <ke...@us...> - 2007-07-23 10:21:36
|
Revision: 1056
http://svn.sourceforge.net/phpfreechat/?rev=1056&view=rev
Author: kerphi
Date: 2007-07-23 03:21:38 -0700 (Mon, 23 Jul 2007)
Log Message:
-----------
Make possible to free the global config when using the pfcInfo API
Modified Paths:
--------------
trunk/src/pfcglobalconfig.class.php
trunk/src/pfcinfo.class.php
Modified: trunk/src/pfcglobalconfig.class.php
===================================================================
--- trunk/src/pfcglobalconfig.class.php 2007-07-20 18:40:26 UTC (rev 1055)
+++ trunk/src/pfcglobalconfig.class.php 2007-07-23 10:21:38 UTC (rev 1056)
@@ -275,14 +275,16 @@
$this->nick = $this->filterNickname($this->nick);
}
- function &Instance( $params = array() )
+ function &Instance( $params = array(), $destroy_instance = false )
{
static $i;
- if (!isset($i))
- $i = new pfcGlobalConfig( $params );
+ if ($destroy_instance)
+ $i = NULL;
+ else
+ if (!isset($i))
+ $i = new pfcGlobalConfig( $params );
return $i;
}
-
/**
* This function saves all the parameters types in order to check later if the types are ok
Modified: trunk/src/pfcinfo.class.php
===================================================================
--- trunk/src/pfcinfo.class.php 2007-07-20 18:40:26 UTC (rev 1055)
+++ trunk/src/pfcinfo.class.php 2007-07-23 10:21:38 UTC (rev 1056)
@@ -28,6 +28,12 @@
$this->c =& pfcGlobalConfig::Instance($params);
}
+ function free()
+ {
+ // free the pfcglobalconfig instance
+ pfcGlobalConfig::Instance(array(), true);
+ }
+
/**
* @return array(string) a list of errors
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|