addType() публичный статический Метод

Adds a custom type to the type map.
public static addType ( string $name, string $className )
$name string Name of the type. This should correspond to what getName() returns.
$className string The class name of the custom type.
Пример #1
0
 /**
  * @backupStaticAttributes enabled
  */
 public function testAddType()
 {
     Type::addType('mock', 'Doctrine\\Tests\\Mocks\\TypeMock');
     $this->assertTrue(Type::hasType('mock'));
     $this->assertEquals('mock', Type::getType('mock')->getName());
 }