intraxia / jaxion

A WordPress plugin framework for modern WordPress development.
http://intraxia.github.io/jaxion/
MIT License
15 stars 3 forks source link

Store instances in array instead of static var #11

Closed mAAdhaTTah closed 7 years ago

mAAdhaTTah commented 7 years ago

Forward static binding only works for methods, not variables, so the instance "sticks" to the class where it's declared. This means that if two classes extend and construct off the parent class, they collide because static::$instance is set by the first constructed class. Distinguishing them by class name avoids this collision.