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(); }
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; }
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); }
/** * 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)); }
/** * Constructor. */ protected function __construct() { parent::__construct(); $this->documentDao = BOL_DocumentDao::getInstance(); }