示例#1
0
 /**
  * Get the cover loader object
  *
  * @return Loader
  */
 protected function getLoader()
 {
     // Construct object for QRCodes if it does not already exist:
     if (!$this->loader) {
         $this->loader = new Loader($this->getConfig(), $this->getServiceLocator()->get('VuFindTheme\\ThemeInfo'));
         \VuFind\ServiceManager\Initializer::initInstance($this->loader, $this->getServiceLocator());
     }
     return $this->loader;
 }
示例#2
0
 /**
  * Get the cover loader object
  *
  * @return Loader
  */
 protected function getLoader()
 {
     // Construct object for loading cover images if it does not already exist:
     if (!$this->loader) {
         $cacheDir = $this->getServiceLocator()->get('VuFind\\CacheManager')->getCache('cover')->getOptions()->getCacheDir();
         $this->loader = new Loader($this->getConfig(), $this->getServiceLocator()->get('VuFind\\ContentCoversPluginManager'), $this->getServiceLocator()->get('VuFindTheme\\ThemeInfo'), $this->getServiceLocator()->get('VuFind\\Http')->createClient(), $cacheDir);
         \VuFind\ServiceManager\Initializer::initInstance($this->loader, $this->getServiceLocator());
     }
     return $this->loader;
 }
示例#3
0
文件: Gateway.php 项目: tillk/vufind
 /**
  * Construct the prototype for rows.
  *
  * @return object
  */
 protected function initializeRowPrototype()
 {
     $prototype = new $this->rowClass($this->getAdapter());
     if ($prototype instanceof ServiceLocatorAwareInterface) {
         $prototype->setServiceLocator($this->getServiceLocator());
     }
     \VuFind\ServiceManager\Initializer::initInstance($prototype, $this->getServiceLocator()->getServiceLocator());
     return $prototype;
 }