dev-master
9999999-devBasic data structure with public properties while validating data type.
MIT
v1.0
1.0.0.0Basic data structure with public properties while validating data type.
MIT
Wallogit.com
2017 © Pedro PelĂĄez
Basic data structure with public properties while validating data type.
Basic data structure with public properties while validating data type., (*2)
Inspired from https://medium.com/laravel-4/ef6b7113dd40, (*3)
Each property will the bind to the type of the first value that is set., (*4)
foo = 1; // initial value $generic->foo = 2; // type not changing, still good $generic->foo = 'foo'; // Exception, wrong type $generic->bar = 'foo'; // Exception, undefined ?>
You may override getPropertyType for more granular control., (*5)
id = 1; $generic->id = null; $generic->id = 'foo'; // Exception ?>
Consider adding readonly properties, (*6)
Basic data structure with public properties while validating data type.
MIT
Basic data structure with public properties while validating data type.
MIT