src/Field.php
public static function create($type) {
        switch ($type) {
            case Field::TYPE_CHARACTER:
                return new field\CharacterField;
            case Field::TYPE_DATE:
                return new field\DateField;
            case Field::TYPE_LOGICAL:
                return new field\LogicalField;
            case Field::TYPE_MEMO:
                return new field\MemoField;
            case Field::TYPE_NUMERIC:
                return new field\NumericField;
            default:
                throw new Exception("Unsupported field `$type`");
        }
    }
public static function create($type) {
        switch ($type) {
            case Field::TYPE_CHARACTER:
                return new field\CharacterField;
            case Field::TYPE_DATE:
                return new field\DateField;
            case Field::TYPE_LOGICAL:
                return new field\LogicalField;
            case Field::TYPE_MEMO:
                return new field\MemoField;
            case Field::TYPE_NUMERIC:
                return new field\NumericField;
            default:
                throw new Exception("Unsupported field `$type`");
        }
    }
public static function create ( $ type ) { switch ( $ type ) { case Field :: TYPE_CHARACTER : return new field \ CharacterField ; case Field :: TYPE_DATE : return new field \ DateField ; case Field :: TYPE_LOGICAL : return new field \ LogicalField ; case Field :: TYPE_MEMO : return new field \ MemoField ; case Field :: TYPE_NUMERIC : return new field \ NumericField ; default : throw new Exception ( "Unsupported field `$type`" ) ; } }
Constructs Filed based on type
@param string $type
@return \org\majkel\dbase\Field
@throws Exception
Constructs Filed based on type