本文整理汇总了PHP中AssociationFactory::getInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP AssociationFactory::getInstance方法的具体用法?PHP AssociationFactory::getInstance怎么用?PHP AssociationFactory::getInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AssociationFactory
的用法示例。
在下文中一共展示了AssociationFactory::getInstance方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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;
}
示例2: clearRegionalSupports
public function clearRegionalSupports()
{
$regional_supports = AssociationFactory::getInstance()->getOne2ManyAssociation($this, 'RegionalSupports');
foreach ($regional_supports as $regional_support) {
$regional_support->clearChannelTypes();
}
$regional_supports->removeAll();
}
示例3: setLocation
/**
* @param IDataCenterLocation $location
*/
public function setLocation(IDataCenterLocation $location)
{
AssociationFactory::getInstance()->getMany2OneAssociation($this, 'Location', 'AvailabilityZones')->setTarget($location);
}
示例4: survey
/**
* @return ISurvey
*/
public function survey()
{
return AssociationFactory::getInstance()->getMany2OneAssociation($this, 'Survey')->getTarget();
}
示例5: package
/**
* @return ISummitPackage
*/
public function package()
{
return AssociationFactory::getInstance()->getMany2OneAssociation($this, 'Package')->getTarget();
}
示例6: setMember
public function setMember(ICLAMember $member)
{
AssociationFactory::getInstance()->getMany2OneAssociation($this, 'Member')->setTarget($member);
}
示例7: getTeamMembers
/**
* @return ICommunityMember[]
*/
public function getTeamMembers()
{
return AssociationFactory::getInstance()->getMany2ManyAssociation($this, 'EditorTeam')->toArray();
}
示例8: clearResources
public function clearResources()
{
AssociationFactory::getInstance()->getOne2ManyAssociation($this, 'Resources')->removeAll();
}
示例9: setReleaseSupportedApiVersion
/**
* @param IReleaseSupportedApiVersion $release_supported_api_version
* @return void
*/
public function setReleaseSupportedApiVersion(IReleaseSupportedApiVersion $release_supported_api_version)
{
AssociationFactory::getInstance()->getMany2OneAssociation($this, 'ReleaseSupportedApiVersion')->setTarget($release_supported_api_version);
}
示例10: removeDocument
public function removeDocument()
{
$target = AssociationFactory::getInstance()->getMany2OneAssociation($this, 'Document')->getTarget();
if ($target->Name) {
$target->deleteDatabaseOnly();
}
}
示例11: getQuestions
/**
* @return ISurveyQuestionTemplate[]
*/
public function getQuestions()
{
$query = new QueryObject();
$query->addOrder(QueryOrder::asc('Order'));
return AssociationFactory::getInstance()->getOne2ManyAssociation($this, 'Questions', $query)->toArray();
}
示例12: clearDataCenterRegions
/**
* @return void
*/
public function clearDataCenterRegions()
{
AssociationFactory::getInstance()->getOne2ManyAssociation($this, 'DataCenterRegions')->removeAll();
}
示例13: getEntities
/**
* @return IEntitySurveyTemplate[]
*/
public function getEntities()
{
return AssociationFactory::getInstance()->getOne2ManyAssociation($this, 'EntitySurveys')->toArray();
}
示例14: getEntity
/**
* @return IEntitySurveyTemplate
*/
public function getEntity()
{
return AssociationFactory::getInstance()->getMany2OneAssociation($this, 'Entity')->getTarget();
}
示例15: updateMember
/**
* @param ICommunityMember $member
* @return void
*/
public function updateMember(ICommunityMember $member)
{
AssociationFactory::getInstance()->getMany2OneAssociation($this, 'Member')->setTarget($member);
}