private $manager = NULL;
private $browser = NULL;
private $downloader = NULL;
+ private $mixinLoader = NULL;
/**
* @var CRM_Extension_ClassLoader
return $this->downloader;
}
- public function applyMixins($force = FALSE) {
- $cache = $this->getCache();
-
- $cachedScan = $force ? NULL : $cache->get('mixinScan');
- $cachedBootData = $force ? NULL : $cache->get('mixinBoot');
-
- [$funcFiles, $mixInfos] = $cachedScan ?: (new CRM_Extension_MixinScanner($this->mapper, $this->manager, TRUE))->build();
- $bootData = $cachedBootData ?: new CRM_Extension_BootCache();
-
- $mixinLoader = new CRM_Extension_MixinLoader();
- $mixinLoader->run($bootData, $funcFiles, $mixInfos);
-
- if ($cachedScan === NULL) {
- $cache->set('mixinScan', [$funcFiles, $mixInfos], 24 * 60 * 60);
- }
- if ($cachedBootData === NULL) {
- $bootData->lock();
- $cache->set('mixinBoot', $bootData, 24 * 60 * 60);
+ /**
+ * @return CRM_Extension_MixinLoader;
+ */
+ public function getMixinLoader() {
+ if ($this->mixinLoader === NULL) {
+ $this->mixinLoader = new CRM_Extension_MixinLoader();
}
+ return $this->mixinLoader;
}
/**