Dumplie\Metadata\Schema\FieldDefinition::type PHP Method

type() public method

public type ( ) : Type
return Type
    public function type() : Type;

Usage Example

Example #1
0
 /**
  * @param string          $schema
  * @param Table           $table
  * @param string          $name
  * @param FieldDefinition $definition
  *
  * @throws DoctrineStorageException
  */
 public function map(string $schema, Table $table, string $name, FieldDefinition $definition)
 {
     foreach ($this->mapping as $mapping) {
         if ($mapping->maps($definition->type())) {
             $mapping->map($schema, $table, $name, $definition);
             return;
         }
     }
     throw DoctrineStorageException::unableToMapType($definition->type());
 }