private function get_file($id) { if ($this->files_cache->contains($id)) { return $this->files_cache->get($id); } else { $file = new File(PATH_TO_ROOT . '/cache/' . $this->prefix . '-' . $id); $this->files_cache->store($id, $file); return $file; } }
/** * @desc Returns the ExtensionPointProvider of the provider which id is $provider_id. * @param string $provider_id The provider id. * @return ExtensionPointProvider The corresponding ExtensionPointProvider. * @throws UnexistingExtensionPointProviderException */ public function get_provider($provider_id) { if (!$this->loaded_providers->contains($provider_id)) { if (!$this->provider_exists($provider_id)) { $this->try_to_reload_modules_providers($provider_id); } $classname = $this->compute_provider_classname($provider_id); $this->loaded_providers->store($provider_id, new $classname()); } return $this->loaded_providers->get($provider_id); }