In PHP arrays may have element values of mixed types. If an application needs to store values of only one specific type, PHP does not stop eventual bugs from storing values of the wrong types in the values.
This class implements an array interface that checks the types of values before adding them to the array, thus making it possible to early detect eventual application bugs.
This class can be used to create arrays that allow members of just one type.
It implements a class loader that gives a special treatment to the creation of objects of classes with the names that start with ArrayOf.
The class assumes that it is intended to create an object of a generic class that manages an array of objects of a class named after the ArrayOf prefix.
It generates code for a new generic array handling class based on a generic class template. The generated class uses type hinting to allow only array members of the intended array element class.
This class can be used with the Type Hint class to allow other types of members besides objects and arrays.