Exemplo n.º 1
0
 /**
  * @return static
  */
 public static final function create()
 {
     $type = get_called_class();
     if (!isset(self::$instances[$type])) {
         $a = explode('\\', $type);
         $typeName = StringUtils::toSlugFromCamel(str_replace('Type', '', end($a)));
         self::$instances[$type] = new static(TypeName::create($typeName));
     }
     return self::$instances[$type];
 }