Commit cb36f5d0 authored by zYne's avatar zYne

--no commit message

--no commit message
parent 023c9196
...@@ -34,30 +34,29 @@ ...@@ -34,30 +34,29 @@
class Doctrine_Manager extends Doctrine_Configurable implements Countable, IteratorAggregate class Doctrine_Manager extends Doctrine_Configurable implements Countable, IteratorAggregate
{ {
/** /**
* @var array $connections an array containing all the opened connections * @var array $connections an array containing all the opened connections
*/ */
protected $_connections = array(); protected $_connections = array();
/** /**
* @var array $bound an array containing all components that have a bound connection * @var array $bound an array containing all components that have a bound connection
*/ */
protected $_bound = array(); protected $_bound = array();
/** /**
* @var integer $index the incremented index * @var integer $index the incremented index
*/ */
protected $_index = 0; protected $_index = 0;
/** /**
* @var integer $currIndex the current connection index * @var integer $currIndex the current connection index
*/ */
protected $_currIndex = 0; protected $_currIndex = 0;
/** /**
* @var string $root root directory * @var string $root root directory
*/ */
protected $_root; protected $_root;
/** /**
* @var array $_integrityActions an array containing all registered integrity actions * @var Doctrine_Query_Registry the query registry
* used when emulating these actions
*/ */
protected $_integrityActions = array(); protected $_queryRegistry;
protected static $driverMap = array('oci' => 'oracle'); protected static $driverMap = array('oci' => 'oracle');
/** /**
...@@ -71,30 +70,6 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera ...@@ -71,30 +70,6 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera
Doctrine_Object::initNullObject(new Doctrine_Null); Doctrine_Object::initNullObject(new Doctrine_Null);
} }
public function addDeleteAction($componentName, $foreignComponent, $action)
{
$this->_integrityActions[$componentName]['onDelete'][$foreignComponent] = $action;
}
public function addUpdateAction($componentName, $foreignComponent, $action)
{
$this->_integrityActions[$componentName]['onUpdate'][$foreignComponent] = $action;
}
public function getDeleteActions($componentName)
{
if ( ! isset($this->_integrityActions[$componentName]['onDelete'])) {
return null;
}
return $this->_integrityActions[$componentName]['onDelete'];
}
public function getUpdateActions($componentName)
{
if ( ! isset($this->_integrityActions[$componentName]['onUpdate'])) {
return null;
}
return $this->_integrityActions[$componentName]['onUpdate'];
}
/** /**
* setDefaultAttributes * setDefaultAttributes
* sets default attributes * sets default attributes
...@@ -156,6 +131,21 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera ...@@ -156,6 +131,21 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera
} }
return $instance; return $instance;
} }
/**
* getQueryRegistry
* lazy-initializes the query registry object and returns it
*
* @return Doctrine_Query_Registry
*/
public function getQueryRegistry()
{
if ( ! isset($this->_queryRegistry)) {
$this->_queryRegistry = new Doctrine_Query_Registry;
}
return $this->_queryRegistry;
}
/** /**
* connection * connection
* *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment