[limb-svn] r7035 - 3.x/trunk/limb/active_record/src
svn at limb-project.com
svn at limb-project.com
Thu May 22 08:03:41 MSD 2008
Author: vasiatka
Date: 2008-05-22 08:03:41 +0400 (Thu, 22 May 2008)
New Revision: 7035
URL: http://fisheye.limb-project.com/changelog/limb/?cs=7035
Modified:
3.x/trunk/limb/active_record/src/lmbActiveRecord.class.php
Log:
-- Changed __wakeup method of active_record
-- deleted __sleep method of active_record
Modified: 3.x/trunk/limb/active_record/src/lmbActiveRecord.class.php
===================================================================
--- 3.x/trunk/limb/active_record/src/lmbActiveRecord.class.php 2008-05-22 03:50:49 UTC (rev 7034)
+++ 3.x/trunk/limb/active_record/src/lmbActiveRecord.class.php 2008-05-22 04:03:41 UTC (rev 7035)
@@ -57,12 +57,12 @@
* @see lmbDbConnection
*/
protected $_db_conn;
-
+
/**
* @var string current database connection dsn
*/
- protected $_db_conn_dsn;
-
+ protected $_db_conn_dsn;
+
/**
* @var object lmbTableGateway instance used to access underlying db table
*/
@@ -210,8 +210,8 @@
else
$this->_db_conn = self :: getDefaultConnection();
- $this->_db_conn_dsn = $this->_db_conn->getDsnString();
-
+ $this->_db_conn_dsn = $this->_db_conn->getDsnString();
+
$this->_db_meta_info = lmbToolkit :: instance()->getActiveRecordMetaInfo($this, $this->_db_conn);
$this->_db_table_fields = $this->_db_meta_info->getDbColumnsNames();
@@ -2172,26 +2172,13 @@
if(isset(self :: $_global_listeners[$type]))
lmbDelegate :: invokeAll(self :: $_global_listeners[$type], array($this));
}
-
+
function __wakeup()
{
$toolkit = lmbToolkit :: instance();
$this->_db_conn = $toolkit->getDbConnectionByDsn($this->_db_conn_dsn);
-
- $this->_db_meta_info = $toolkit->getActiveRecordMetaInfo($this, $this->_db_conn);
- $this->_db_table_fields = $this->_db_meta_info->getDbColumnsNames();
-
- $this->_db_table = $this->_db_meta_info->getDbTable();
- $this->_db_table->setPrimaryKeyName($this->_primary_key_name);
- $this->_db_table_name = $this->_db_table->getTableName();
}
-
- function __sleep()
- {
- $vars = array_keys(get_object_vars($this));
- $vars = array_diff($vars, array('_db_conn', '_db_table', '_db_meta_info'));
- return $vars;
- }
+
}
More information about the limb-svn
mailing list