Beispiel #1
0
 /**
  * Returns storage manager
  * 
  * @param \Krystal\Stdlib\VirtualEntity $config
  * @return \Krystal\Http\PersistentStorageInterface
  */
 private function createStorage(VirtualEntity $config)
 {
     if ($config->getBasketStorageType() == 'cookies') {
         return $this->getServiceLocator()->get('request')->getCookieBag();
     } else {
         // Always session storage by default
         return $this->getServiceLocator()->get('sessionBag');
     }
 }