コード例 #1
0
ファイル: vote_service.php プロジェクト: vazahat/dudex
 /**
  * Constructor.
  *
  */
 private function __construct()
 {
     $this->voteDao = BOL_VoteDao::getInstance();
 }
コード例 #2
0
ファイル: vote_dao.php プロジェクト: hardikamutech/loov
 /**
  * Gets all votes for provided entity type and list of entity id
  * 
  * @param array<int> $idList
  * @param string $entityType
  * @return array<BOL_Vote>
  */
 public function getEntityTypeVotes(array $idList, $entityType)
 {
     if (empty($idList) || empty($entityType)) {
         return array();
     }
     $example = new OW_Example();
     $example->andFieldEqual(BOL_VoteDao::ENTITY_TYPE, $entityType);
     $example->andFieldInArray(BOL_VoteDao::ENTITY_ID, $idList);
     $example->andFieldEqual(BOL_VoteDao::ACTIVE, 1);
     return BOL_VoteDao::getInstance()->findListByExample($example);
 }