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


PHP AssociationFactory類代碼示例

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


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

示例1: getInstance

 /**
  * @return AssociationFactory
  */
 public static function getInstance()
 {
     if (!is_object(self::$instance)) {
         self::$instance = new AssociationFactory();
     }
     return self::$instance;
 }
開發者ID:OpenStackweb,項目名稱:openstack-org,代碼行數:10,代碼來源:AssociationFactory.php

示例2: 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

示例3: clearRegionalSupports

 public function clearRegionalSupports()
 {
     $regional_supports = AssociationFactory::getInstance()->getOne2ManyAssociation($this, 'RegionalSupports');
     foreach ($regional_supports as $regional_support) {
         $regional_support->clearChannelTypes();
     }
     $regional_supports->removeAll();
 }
開發者ID:OpenStackweb,項目名稱:openstack-org,代碼行數:8,代碼來源:RegionalSupportedCompanyService.php

示例4: setLocation

 /**
  * @param IDataCenterLocation $location
  */
 public function setLocation(IDataCenterLocation $location)
 {
     AssociationFactory::getInstance()->getMany2OneAssociation($this, 'Location', 'AvailabilityZones')->setTarget($location);
 }
開發者ID:OpenStackweb,項目名稱:openstack-org,代碼行數:7,代碼來源:AvailabilityZone.php

示例5: setLastJobRegistrationRequest

 /**
  * @param IJobRegistrationRequest $request
  * @return void
  */
 public function setLastJobRegistrationRequest(IJobRegistrationRequest $request)
 {
     AssociationFactory::getInstance()->getMany2OneAssociation($this, 'LastJobRegistrationRequest')->setTarget($request);
 }
開發者ID:OpenStackweb,項目名稱:openstack-org,代碼行數:8,代碼來源:JobAlertEmail.php

示例6: getTeamMembers

 /**
  * @return ICommunityMember[]
  */
 public function getTeamMembers()
 {
     return AssociationFactory::getInstance()->getMany2ManyAssociation($this, 'EditorTeam')->toArray();
 }
開發者ID:Thingee,項目名稱:openstack-org,代碼行數:7,代碼來源:EntitySurvey.php

示例7: clearPricingSchemas

 public function clearPricingSchemas()
 {
     AssociationFactory::getInstance()->getMany2ManyAssociation($this, 'PricingSchemas')->removeAll();
 }
開發者ID:OpenStackweb,項目名稱:openstack-org,代碼行數:4,代碼來源:CloudServiceOfferedDraft.php

示例8: registerCheckInOnEvent

 public function registerCheckInOnEvent(ISummitEvent $summit_event)
 {
     AssociationFactory::getInstance()->getMany2ManyAssociation($this, 'Schedule')->remove($summit_event);
     AssociationFactory::getInstance()->getMany2ManyAssociation($this, 'Schedule')->add($summit_event, array('IsCheckedIn' => true));
 }
開發者ID:rbowen,項目名稱:openstack-org,代碼行數:5,代碼來源:SummitAttendee.php

示例9: updateMember

 /**
  * @param ICommunityMember $member
  * @return void
  */
 public function updateMember(ICommunityMember $member)
 {
     AssociationFactory::getInstance()->getMany2OneAssociation($this, 'Member')->setTarget($member);
 }
開發者ID:OpenStackweb,項目名稱:openstack-org,代碼行數:8,代碼來源:Candidate.php

示例10: getTargetQuestion

 /**
  * @return ISurveyQuestionTemplate
  */
 public function getTargetQuestion()
 {
     return AssociationFactory::getInstance()->getMany2OneAssociation($this, 'TargetField')->getTarget();
 }
開發者ID:rbowen,項目名稱:openstack-org,代碼行數:7,代碼來源:AbstractSurveyMigrationMapping.php

示例11: clearVersions

 public function clearVersions()
 {
     AssociationFactory::getInstance()->getOne2ManyAssociation($this, 'Versions')->removeAll();
 }
開發者ID:Thingee,項目名稱:openstack-org,代碼行數:4,代碼來源:OpenStackComponent.php

示例12: removeDocument

 public function removeDocument()
 {
     $target = AssociationFactory::getInstance()->getMany2OneAssociation($this, 'Document')->getTarget();
     if ($target->Name) {
         $target->deleteDatabaseOnly();
     }
 }
開發者ID:Thingee,項目名稱:openstack-org,代碼行數:7,代碼來源:News.php

示例13: getQuestions

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

示例14: getEntities

 /**
  * @return IEntitySurveyTemplate[]
  */
 public function getEntities()
 {
     return AssociationFactory::getInstance()->getOne2ManyAssociation($this, 'EntitySurveys')->toArray();
 }
開發者ID:rbowen,項目名稱:openstack-org,代碼行數:7,代碼來源:SurveyTemplate.php

示例15: clearDataCenterRegions

 /**
  * @return void
  */
 public function clearDataCenterRegions()
 {
     AssociationFactory::getInstance()->getOne2ManyAssociation($this, 'DataCenterRegions')->removeAll();
 }
開發者ID:OpenStackweb,項目名稱:openstack-org,代碼行數:7,代碼來源:CloudService.php


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