예제 #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;
 }
예제 #2
0
 /**
  * Constructor.
  *
  */
 protected function __construct()
 {
     parent::__construct();
 }
예제 #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;
 }
예제 #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);
 }
예제 #5
0
파일: clip_dao.php 프로젝트: vazahat/dudex
 /**
  * Class constructor
  *
  */
 protected function __construct()
 {
     parent::__construct();
     $this->userDao = BOL_UserDao::getInstance();
 }
예제 #6
0
 public function findAll($cacheLifeTime = 0, $tags = array())
 {
     return parent::findAll(3600 * 24, array(BOL_AuthorizationActionDao::CACHE_TAG_AUTHORIZATION, OW_CacheManager::TAG_OPTION_INSTANT_LOAD));
 }
예제 #7
0
 /**
  * Constructor.
  */
 protected function __construct()
 {
     parent::__construct();
     $this->documentDao = BOL_DocumentDao::getInstance();
 }