當前位置: 首頁>>代碼示例>>PHP>>正文


PHP QueryObject類代碼示例

本文整理匯總了PHP中QueryObject的典型用法代碼示例。如果您正苦於以下問題:PHP QueryObject類的具體用法?PHP QueryObject怎麽用?PHP QueryObject使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了QueryObject類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: findByDupeAccount

 /**
  * @param string $dupe_account_email
  * @return IDupeMemberActionAccountRequest
  */
 public function findByDupeAccount($dupe_account_email)
 {
     $query = new QueryObject(new $this->entity_class());
     $query->addAlias(QueryAlias::create('DupeAccount'));
     $query->addAndCondition(QueryCriteria::equal('Member.Email', $dupe_account_email));
     return $this->getBy($query);
 }
開發者ID:OpenStackweb,項目名稱:openstack-org,代碼行數:11,代碼來源:SapphireDupeMemberActionAccountRequestRepository.php

示例2: getAllByName

 /**
  * @param string $first_name
  * @param string $last_name
  * @return ICommunityMember[]
  */
 public function getAllByName($first_name, $last_name)
 {
     $query = new QueryObject(new Member());
     $query->addAndCondition(QueryCriteria::equal('FirstName', $first_name));
     $query->addAndCondition(QueryCriteria::equal('Surname', $last_name));
     return $this->getAll($query, 0, 999999);
 }
開發者ID:rbowen,項目名稱:openstack-org,代碼行數:12,代碼來源:SapphireDupesMemberRepository.php

示例3: getFeedback

 public function getFeedback($event_id, $member_id)
 {
     $query = new QueryObject(new SummitEventFeedback());
     $query->addAndCondition(QueryCriteria::equal('OwnerID', $member_id));
     $query->addAndCondition(QueryCriteria::equal('EventID', $event_id));
     return $this->getBy($query);
 }
開發者ID:OpenStackweb,項目名稱:openstack-org,代碼行數:7,代碼來源:SapphireEventFeedbackRepository.php

示例4: getLatestNElections

 /**
  * @param int $n
  * @return IElection[]
  */
 public function getLatestNElections($n)
 {
     $query = new QueryObject(new Election());
     $query->addOrder(QueryOrder::desc('ElectionsOpen'));
     list($list, $count) = $this->getAll($query, 0, $n);
     return $list;
 }
開發者ID:OpenStackweb,項目名稱:openstack-org,代碼行數:11,代碼來源:SapphireElectionRepository.php

示例5: getSteps

 /**
  * @return ISurveyStep[]
  */
 public function getSteps()
 {
     $query = new QueryObject(new SurveyStep());
     $query->addAlias(QueryAlias::create('Template'));
     $query->addOrder(QueryOrder::asc('Template.Order'));
     return new ArrayList(AssociationFactory::getInstance()->getOne2ManyAssociation($this, 'Steps', $query)->toArray());
 }
開發者ID:Thingee,項目名稱:openstack-org,代碼行數:10,代碼來源:Survey.php

示例6: isScheduled

 /**
  * @return bool
  */
 public function isScheduled($event_id)
 {
     $query = new QueryObject($this);
     $query->addAndCondition(QueryCriteria::equal('SummitEvent.ID', $event_id));
     $events = AssociationFactory::getInstance()->getMany2ManyAssociation($this, 'Schedule', $query)->toArray();
     return count($events) > 0;
 }
開發者ID:rbowen,項目名稱:openstack-org,代碼行數:10,代碼來源:SummitAttendee.php

示例7: testShouldReturnQuerySelectWithOrderStatement

 public function testShouldReturnQuerySelectWithOrderStatement()
 {
     $query = new QueryObject($table = 'users');
     $expected = "SELECT * FROM users ORDER BY name;";
     $result = $query->select()->where("name = 'TestName'")->where("age = 18")->order("name")->toString();
     $this->assertEquals($expected, $result);
 }
開發者ID:amaivsimau,項目名稱:dojos,代碼行數:7,代碼來源:QueryObjectTest.php

示例8: addQuestion

 /**
  * @param ISurveyQuestionTemplate $question
  * @return $this
  */
 public function addQuestion(ISurveyQuestionTemplate $question)
 {
     $query = new QueryObject();
     $query->addOrder(QueryOrder::asc('Order'));
     return AssociationFactory::getInstance()->getOne2ManyAssociation($this, 'Questions', $query)->add($question);
     return $this;
 }
開發者ID:Thingee,項目名稱:openstack-org,代碼行數:11,代碼來源:SurveyRegularStepTemplate.php

示例9: getByNameAndCompany

 /**
  * @param string $name
  * @param int    $company_id
  * @return ITeam
  */
 public function getByNameAndCompany($name, $company_id)
 {
     $query = new QueryObject(new Team());
     $query->addAndCondition(QueryCriteria::equal('CompanyID', $company_id));
     $query->addAndCondition(QueryCriteria::equal('Name', $name));
     return $this->getBy($query);
 }
開發者ID:OpenStackweb,項目名稱:openstack-org,代碼行數:12,代碼來源:SapphireTeamRepository.php

示例10: getAllIClaMembersByLastName

 /**
  * @param string $last_name
  * @param int $offset
  * @param int $limit
  * @return array
  */
 function getAllIClaMembersByLastName($last_name, $offset, $limit)
 {
     $query = new QueryObject();
     $query->addAndCondition(QueryCriteria::equal('CLASigned', true));
     $query->addAndCondition(QueryCriteria::like('Surname', $last_name));
     return $this->getAll($query, $offset, $limit);
 }
開發者ID:Thingee,項目名稱:openstack-org,代碼行數:13,代碼來源:SapphireCLAMemberRepository.php

示例11: exportCCLACompanies

 public function exportCCLACompanies()
 {
     //clean output buffer
     ob_end_clean();
     // file name for download
     $filename = "companies_ccla" . date('Ymd') . ".xls";
     header("Content-Disposition: attachment; filename=\"{$filename}\"");
     header("Content-Type: application/vnd.ms-excel");
     $query = new QueryObject();
     $query->addOrder(QueryOrder::asc('Name'));
     list($list, $size) = $this->company_repository->getAll($query, 0, 1000);
     $data = array();
     foreach ($list as $company) {
         $row = array();
         $row['CompanyName'] = $company->Name;
         $row['CCLADate'] = $company->isICLASigned() ? $company->CCLADate : 'N/A';
         $row['CCLASigned'] = $company->isICLASigned() ? 'True' : 'False';
         array_push($data, $row);
     }
     $flag = false;
     foreach ($data as $row) {
         if (!$flag) {
             // display field/column names as first row
             echo implode("\t", array_keys($row)) . "\n";
             $flag = true;
         }
         array_walk($row, array($this, 'cleanData'));
         echo implode("\t", array_values($row)) . "\n";
     }
 }
開發者ID:OpenStackweb,項目名稱:openstack-org,代碼行數:30,代碼來源:SangriaPageICLACompaniesExtension.php

示例12: findByInviteEmailAndTeam

 /**
  * @param string $email
  * @param ITeam $team
  * @return ITeamInvitation
  */
 public function findByInviteEmailAndTeam($email, ITeam $team)
 {
     $query = new QueryObject();
     $query->addAndCondition(QueryCriteria::equal('Email', $email));
     $query->addAndCondition(QueryCriteria::equal('TeamID', $team->getIdentifier()));
     return $this->getBy($query);
 }
開發者ID:OpenStackweb,項目名稱:openstack-org,代碼行數:12,代碼來源:SapphireTeamInvitationRepository.php

示例13: getNominationsByNominee

 public function getNominationsByNominee($member_id, $offset = 0, $limit = 10)
 {
     $query = new QueryObject(new CandidateNomination());
     $query->addAlias(QueryAlias::create('Candidate'));
     $query->addAndCondition(QueryCriteria::equal('Member.ID', $member_id));
     return $this->getAll($query, $offset, $limit);
 }
開發者ID:OpenStackweb,項目名稱:openstack-org,代碼行數:7,代碼來源:SapphireCandidateNominationRepository.php

示例14: getByTemplateAndCreator

 /**
  * @param int $template_id
  * @param int $creator_id
  * @return ISurvey|null
  */
 public function getByTemplateAndCreator($template_id, $creator_id)
 {
     $query = new QueryObject();
     $query->addAndCondition(QueryCriteria::equal('TemplateID', $template_id));
     $query->addAndCondition(QueryCriteria::equal('CreatedByID', $creator_id));
     return $this->getBy($query);
 }
開發者ID:OpenStackweb,項目名稱:openstack-org,代碼行數:12,代碼來源:SapphireSurveyRepository.php

示例15: getAllNotPostedAndNotRejected

 /**
  * @param int $offset
  * @param int $limit
  * @return array
  */
 public function getAllNotPostedAndNotRejected($offset = 0, $limit = 10)
 {
     $query = new QueryObject();
     $query->addAndCondition(QueryCriteria::equal('isPosted', 0));
     $query->addAndCondition(QueryCriteria::equal('isRejected', 0));
     return $this->getAll($query, $offset, $limit);
 }
開發者ID:OpenStackweb,項目名稱:openstack-org,代碼行數:12,代碼來源:SapphireJobRegistrationRequestRepository.php


注:本文中的QueryObject類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。