Dumplie\Metadata\Schema\Type::__construct PHP Method

__construct() public method

Type constructor.
public __construct ( string $type )
$type string
    public function __construct(string $type)
    {
        if (!in_array($type, $this->allowed, true)) {
            throw InvalidTypeException::invalidType($type, $this->allowed);
        }
        $this->type = $type;
    }