/** * Pseudo-static constructor, this method only once, * only the first time this class is instantiated * * It's used to pre-load some of the core library classes that * we are most likely to use - most other libraries (for example BBLegacy, BBTournament), * are only loaded as they are used * * @param BinaryBeast $bb Since it's a static method, we need a reference to the instance * * @return void */ private static function init(&$bb) { $bb->load_library('BBConfiguration'); $bb->load_library('BBHelper'); $bb->load_library('BBSimpleModel'); $bb->load_library('BBModel'); $bb->load_library('BBCache'); $bb->load_library('BBCallback'); $bb->load_library('BBDev'); //Next instantiation will know not to call this method self::$first = false; }