Example #1
0
 public function testCacheMappers()
 {
     $mapper = $this->session->getMapperFor('Bug');
     $this->assertSame($mapper, $this->session->getMapperFor('Bug'));
     $mapper = $this->session->getMapperFor('Project');
     $this->assertSame($mapper, $this->session->getMapperFor('Project'));
 }
Example #2
0
 public function attach($obj)
 {
     $this->values[spl_object_hash($obj)] = array('object' => $obj, 'original' => $this->session->getMapperFor($obj)->getValues($obj));
 }