32 public function get($class, $primary)
34 $collection = $this->getCollectionByClass($class);
35 return $collection->getByPrimary($primary);
45 public function put($object)
47 $collection = $this->getCollectionByClass(get_class($object));
48 $collection[] = $object;
60 public function getCollectionByClass($class)
62 if (empty($this->collections[$class]))
66 if (!empty($this->collections[$normalizedClass]))
68 $this->collections[$class] = $this->collections[$normalizedClass];
82 $collection = $entity->createCollection();
84 $this->collections[$class] = $collection;
85 $this->collections[$normalizedClass] = $collection;
89 return $this->collections[$class];
static normalizeName($entityName)
static getInstance($entityName)