Encapsulated the part of code that ensures that static::$instances is ready for use into the prepare_instances() function.
Encapsulated the part of code that ensures that static::$instances is ready for use into the prepare_instances() function.

axelitus/php-design-patterns