Ejemplo n.º 1
0
 public function test_can_get_mappers()
 {
     $set = new MapperSet();
     $this->assertCount(0, $set->getMappers());
     $mapping = new StubEntityMapping();
     $set->add($mapping);
     $this->assertCount(1, $set->getMappers());
     // Mapping will only get registered once
     $set->add($mapping);
     $this->assertCount(1, $set->getMappers());
 }
Ejemplo n.º 2
0
 /**
  * @param Mapping $mapping
  *
  * @throws MappingException
  * @return void
  */
 public function addMapping(Mapping $mapping)
 {
     $this->mappers->add($mapping);
 }
Ejemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 public function addMapperTo(MapperSet $mappers)
 {
     $mappers->addMapper($this->mapFor(), new EmbeddableMapper($this));
 }
Ejemplo n.º 4
0
 /**
  * {@inheritdoc}
  */
 public function addMapperTo(MapperSet $mappers)
 {
     $mappers->addMapper($this->mapFor(), new EntityMapper($this));
 }
Ejemplo n.º 5
0
 /**
  * {@inheritdoc}
  */
 public function addMapperTo(MapperSet $mappers)
 {
     $mappers->addMapper($this->mapFor(), new MappedSuperClassMapper($this));
 }