Custom Platform
You can create your own platform, which will contain your own set of types and rules for processing them.
For ease of use, you can extend from the abstract class TypeLang\Mapper\Platform\Platform, the implementation of which is suitable for most cases.
To implement a platform, you should implement a single method getName(), which should return the custom name of the platform.
You can already use it by simply specifying a new CustomPlatform() instance in the mapper, as in the example above.
Adding Types
Each platform contains a list of supported types. If you don't specify these explicitly, the platform will be empty, meaning it won't support any types. To extend these types, override the getTypes() method:
As you may have noticed, your getTypes() method contains a call to parent::getTypes(). This will return the list of types you pass to the new CustomPlatform() constructor.
The ability to override/add types is provided by the abstract TypeLang\Mapper\Platform\Platform class, from which the platform extends.
Yes, you can remove this ability. To do so, simply remove the call to parent::getTypes() from the method or implement TypeLang\Mapper\Platform\PlatformInterface instead of abstract TypeLang\Mapper\Platform\Platform class.
Adding Type Coercions
By default, your platform doesn't implement any type casts (type coercions). Therefore, the "strict types" configuration option doesn't actually work.
If you want to support any type casts, you should explicitly specify which types the cast applies to by overriding the getTypeCoercers() method: