getMapper() публичный Метод

Retrieves a DataMapper for the given $entityClass. This can only be done if the Schema for that entity has been previously registered with registerSchema() method.
public getMapper ( string $entityClass ) : DataMapper | null
$entityClass string Class of the entity that needs to be mapped.
Результат Mongolid\DataMapper\DataMapper | null DataMapper configured for the $entityClass.
Пример #1
0
 public function testShouldNotGetDataMapperForUnknownEntities()
 {
     // Arrange
     $manager = new Manager();
     // Assert
     $result = $manager->getMapper('Unknow');
     $this->assertNull($result);
 }