本文整理汇总了PHP中OW_BaseDao类的典型用法代码示例。如果您正苦于以下问题:PHP OW_BaseDao类的具体用法?PHP OW_BaseDao怎么用?PHP OW_BaseDao使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了OW_BaseDao类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: findByIdList
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: __construct
/**
* Constructor.
*
*/
protected function __construct()
{
parent::__construct();
}
示例3: findIdListByIdList
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: __construct
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: __construct
/**
* Class constructor
*
*/
protected function __construct()
{
parent::__construct();
$this->userDao = BOL_UserDao::getInstance();
}
示例6: findAll
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: __construct
/**
* Constructor.
*/
protected function __construct()
{
parent::__construct();
$this->documentDao = BOL_DocumentDao::getInstance();
}