<?php
namespace nur\sery\schema\types;

class Registry {
  const TYPES = [
    "string" => tstring::class,
    "bool" => tbool::class, "boolean" => tbool::class,
    "int" => tint::class, "integer" => tint::class,
    "float" => tfloat::class, "flt" => tfloat::class,
    "double" => tfloat::class, "dbl" => tfloat::class,
    "array" => tarray::class,
    "callable" => tcallable::class,
  ];

  function __construct() {
    $this->types = [];
  }

  /** @var IType[] */
  protected $types;

  function get(string $name): IType {
    #XXX les instancier
    return $this->types[$name];
  }
}
