Example #1
0
 public function findByIdList(array $idList, $cacheLifeTime = 0, $tags = array())
 {
     $idList = array_map('intval', $idList);
     $idsToRequire = array();
     $result = array();
     foreach ($idList as $id) {
         if (empty($this->cachedItems[$id])) {
             $idsToRequire[] = $id;
         } else {
             $result[] = $this->cachedItems[$id];
         }
     }
     $items = array();
     if (!empty($idsToRequire)) {
         $items = parent::findByIdList($idsToRequire, $cacheLifeTime, $tags);
     }
     foreach ($items as $item) {
         $result[] = $item;
         $this->cachedItems[(int) $item->getId()] = $item;
     }
     return $result;
 }
 /**
  * Constructor.
  *
  */
 protected function __construct()
 {
     parent::__construct();
 }
Example #3
0
 public function findIdListByIdList(array $idList, $cacheLifeTime = 0, $tags = array())
 {
     $idList = array_map('intval', $idList);
     $idsToRequire = array();
     $result = array();
     foreach ($idList as $id) {
         if (empty($this->cachedIds[$id])) {
             $idsToRequire[] = $id;
         } else {
             $result[] = $this->cachedIds[$id];
         }
     }
     $items = array();
     if (!empty($idsToRequire)) {
         $example = new OW_Example();
         $example->andFieldInArray('id', $idsToRequire);
         $items = parent::findIdListByExample($example);
     }
     foreach ($items as $item) {
         $result[] = $item;
         $this->cachedIds[(int) $item] = (int) $item;
     }
     return $result;
 }
Example #4
0
 protected function __construct()
 {
     parent::__construct();
     $this->typeToPrefix = array(PHOTO_BOL_PhotoService::TYPE_ORIGINAL => self::PHOTO_ORIGINAL_PREFIX, PHOTO_BOL_PhotoService::TYPE_FULLSCREEN => self::PHOTO_FULLSCREEN_PREFIX, PHOTO_BOL_PhotoService::TYPE_MAIN => self::PHOTO_PREFIX, PHOTO_BOL_PhotoService::TYPE_PREVIEW => self::PHOTO_PREVIEW_PREFIX, PHOTO_BOL_PhotoService::TYPE_SMALL => self::PHOTO_SMALL_PREFIX);
 }
Example #5
0
 /**
  * Class constructor
  *
  */
 protected function __construct()
 {
     parent::__construct();
     $this->userDao = BOL_UserDao::getInstance();
 }
 public function findAll($cacheLifeTime = 0, $tags = array())
 {
     return parent::findAll(3600 * 24, array(BOL_AuthorizationActionDao::CACHE_TAG_AUTHORIZATION, OW_CacheManager::TAG_OPTION_INSTANT_LOAD));
 }
Example #7
0
 /**
  * Constructor.
  */
 protected function __construct()
 {
     parent::__construct();
     $this->documentDao = BOL_DocumentDao::getInstance();
 }