Commit cb36f5d0 authored by zYne's avatar zYne

--no commit message

--no commit message
parent 023c9196
...@@ -54,10 +54,9 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera ...@@ -54,10 +54,9 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera
*/ */
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