/** * * * This will get called 4 times. * * 1 & 2: Finding all autoloading files from components that have been loaded by (1) plugins or (2) the theme. * 3 & 4: Finding all autoloading files defined by modules specified by (1) plugins or (2) the theme. * * Each time it is called it will have values added to self::$_mustload_classes. * * @param array $autoload_files */ static function _set_mustload_classes($autoload_files) { if ($mustload_classes = static::cache_get($cache_key = "mustload_classes")) { self::$_mustload_classes = $mustload_classes; } else { foreach (array_keys($autoload_files) as $class_name) { if (is_callable(array($class_name, 'on_load'))) { self::$_mustload_classes[$class_name] = get_parent_class($class_name); } } } }