From 24528cb8513008d01c29b7690e8e6eee90641718 Mon Sep 17 00:00:00 2001 From: doctrine Date: Fri, 21 Jul 2006 23:27:04 +0000 Subject: [PATCH] --- Doctrine/IdentityMap.class.php | 51 ---------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 Doctrine/IdentityMap.class.php diff --git a/Doctrine/IdentityMap.class.php b/Doctrine/IdentityMap.class.php deleted file mode 100644 index 4d0e15eed..000000000 --- a/Doctrine/IdentityMap.class.php +++ /dev/null @@ -1,51 +0,0 @@ -_table = $_table; - } - - - abstract public function get(); -} -class Doctrine_IdentityMap { - private $identityMap = array(); - - /** - * first checks if record exists in identityMap, if not - * returns a new record - * - * @return Doctrine_Record - */ - public function get() { - $key = $this->getIdentifier(); - - if( ! is_array($key)) - $key = array($key); - - - foreach($key as $k) { - if( ! isset($this->data[$k])) - throw new Doctrine_Exception("No primary key found"); - - $id[] = $this->data[$k]; - } - $id = implode(' ', $id); - - if(isset($this->identityMap[$id])) - $record = $this->identityMap[$id]; - else { - $record = new $this->name($this); - $this->identityMap[$id] = $record; - } - $this->data = array(); - - return $record; - } -} -?>