本文整理汇总了PHP中Propel\Runtime\Collection\ObjectCollection::push方法的典型用法代码示例。如果您正苦于以下问题:PHP ObjectCollection::push方法的具体用法?PHP ObjectCollection::push怎么用?PHP ObjectCollection::push使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Propel\Runtime\Collection\ObjectCollection
的用法示例。
在下文中一共展示了ObjectCollection::push方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetGetterRelatedBy
public function testGetGetterRelatedBy()
{
$objectA = new \Issue656TestObject();
$objectA->setName('A');
$objectB = new \Issue656TestObject();
$objectB->setName('B');
$collection = new ObjectCollection();
$collection->push($objectB);
$objectA->setIssue656TestObjectsRelatedByTo($collection);
$this->assertEquals($collection, $objectA->getIssue656TestObjectsRelatedByTo());
}
示例2: removeGallery
/**
* Remove gallery of this object
* through the images_galleries_map cross reference table.
*
* @param ChildGallery $gallery
* @return ChildImage The current object (for fluent API support)
*/
public function removeGallery(ChildGallery $gallery)
{
if ($this->getGalleries()->contains($gallery)) {
$imageGalleryMap = new ChildImageGalleryMap();
$imageGalleryMap->setGallery($gallery);
if ($gallery->isImagesLoaded()) {
//remove the back reference if available
$gallery->getImages()->removeObject($this);
}
$imageGalleryMap->setImage($this);
$this->removeImageGalleryMap(clone $imageGalleryMap);
$imageGalleryMap->clear();
$this->collGalleries->remove($this->collGalleries->search($gallery));
if (null === $this->galleriesScheduledForDeletion) {
$this->galleriesScheduledForDeletion = clone $this->collGalleries;
$this->galleriesScheduledForDeletion->clear();
}
$this->galleriesScheduledForDeletion->push($gallery);
}
return $this;
}
示例3: removeFormats
/**
* Remove formats of this object
* through the R_templatenames_inchapter cross reference table.
*
* @param ChildFormats $formats
* @return ChildTemplatenames The current object (for fluent API support)
*/
public function removeFormats(ChildFormats $formats)
{
if ($this->getFormatss()->contains($formats)) {
$rTemplatenamesInchapter = new ChildRTemplatenamesInchapter();
$rTemplatenamesInchapter->setFormats($formats);
if ($formats->isTemplatenamessLoaded()) {
//remove the back reference if available
$formats->getTemplatenamess()->removeObject($this);
}
$rTemplatenamesInchapter->setTemplatenames($this);
$this->removeRTemplatenamesInchapter(clone $rTemplatenamesInchapter);
$rTemplatenamesInchapter->clear();
$this->collFormatss->remove($this->collFormatss->search($formats));
if (null === $this->formatssScheduledForDeletion) {
$this->formatssScheduledForDeletion = clone $this->collFormatss;
$this->formatssScheduledForDeletion->clear();
}
$this->formatssScheduledForDeletion->push($formats);
}
return $this;
}
示例4: removeServices
/**
* Remove services of this object
* through the object_services cross reference table.
*
* @param ChildServices $services
* @return ChildObject The current object (for fluent API support)
*/
public function removeServices(ChildServices $services)
{
if ($this->getServicess()->contains($services)) {
$objectServices = new ChildObjectServices();
$objectServices->setServices($services);
if ($services->isObjectsLoaded()) {
//remove the back reference if available
$services->getObjects()->removeObject($this);
}
$objectServices->setObject($this);
$this->removeObjectServices(clone $objectServices);
$objectServices->clear();
$this->collServicess->remove($this->collServicess->search($services));
if (null === $this->servicessScheduledForDeletion) {
$this->servicessScheduledForDeletion = clone $this->collServicess;
$this->servicessScheduledForDeletion->clear();
}
$this->servicessScheduledForDeletion->push($services);
}
return $this;
}
示例5: removeLocalization
/**
* Remove localization of this object
* through the kk_localization_variant cross reference table.
*
* @param ChildLocalization $localization
* @return ChildLanguageVariant The current object (for fluent API support)
*/
public function removeLocalization(ChildLocalization $localization)
{
if ($this->getLocalizations()->contains($localization)) {
$localizationVariant = new ChildLocalizationVariant();
$localizationVariant->setLocalization($localization);
if ($localization->isLanguageVariantsLoaded()) {
//remove the back reference if available
$localization->getLanguageVariants()->removeObject($this);
}
$localizationVariant->setLanguageVariant($this);
$this->removeLocalizationVariant(clone $localizationVariant);
$localizationVariant->clear();
$this->collLocalizations->remove($this->collLocalizations->search($localization));
if (null === $this->localizationsScheduledForDeletion) {
$this->localizationsScheduledForDeletion = clone $this->collLocalizations;
$this->localizationsScheduledForDeletion->clear();
}
$this->localizationsScheduledForDeletion->push($localization);
}
return $this;
}
示例6: removeSkill
/**
* Remove skill of this object
* through the kk_trixionary_skill_group cross reference table.
*
* @param ChildSkill $skill
* @return ChildGroup The current object (for fluent API support)
*/
public function removeSkill(ChildSkill $skill)
{
if ($this->getSkills()->contains($skill)) {
$skillGroup = new ChildSkillGroup();
$skillGroup->setSkill($skill);
if ($skill->isGroupsLoaded()) {
//remove the back reference if available
$skill->getGroups()->removeObject($this);
}
$skillGroup->setGroup($this);
$this->removeSkillGroup(clone $skillGroup);
$skillGroup->clear();
$this->collSkills->remove($this->collSkills->search($skill));
if (null === $this->skillsScheduledForDeletion) {
$this->skillsScheduledForDeletion = clone $this->collSkills;
$this->skillsScheduledForDeletion->clear();
}
$this->skillsScheduledForDeletion->push($skill);
}
return $this;
}
示例7: removeUser
/**
* Remove user of this object
* through the user_group cross reference table.
*
* @param ChildUser $user
* @return ChildGroup The current object (for fluent API support)
*/
public function removeUser(ChildUser $user)
{
if ($this->getUsers()->contains($user)) {
$userGroup = new ChildUserGroup();
$userGroup->setUser($user);
if ($user->isGroupsLoaded()) {
//remove the back reference if available
$user->getGroups()->removeObject($this);
}
$userGroup->setGroup($this);
$this->removeUserGroup(clone $userGroup);
$userGroup->clear();
$this->collUsers->remove($this->collUsers->search($user));
if (null === $this->usersScheduledForDeletion) {
$this->usersScheduledForDeletion = clone $this->collUsers;
$this->usersScheduledForDeletion->clear();
}
$this->usersScheduledForDeletion->push($user);
}
return $this;
}
示例8: removeRights
/**
* Remove rights of this object
* through the R_rights_foruser cross reference table.
*
* @param ChildRights $rights
* @return ChildUsers The current object (for fluent API support)
*/
public function removeRights(ChildRights $rights)
{
if ($this->getRightss()->contains($rights)) {
$rRightsForuser = new ChildRRightsForuser();
$rRightsForuser->setRights($rights);
if ($rights->isUserssLoaded()) {
//remove the back reference if available
$rights->getUserss()->removeObject($this);
}
$rRightsForuser->setUsers($this);
$this->removeRRightsForuser(clone $rRightsForuser);
$rRightsForuser->clear();
$this->collRightss->remove($this->collRightss->search($rights));
if (null === $this->rightssScheduledForDeletion) {
$this->rightssScheduledForDeletion = clone $this->collRightss;
$this->rightssScheduledForDeletion->clear();
}
$this->rightssScheduledForDeletion->push($rights);
}
return $this;
}
示例9: removeObject
/**
* Remove object of this object
* through the object_category cross reference table.
*
* @param ChildObject $object
* @return ChildCategory The current object (for fluent API support)
*/
public function removeObject(ChildObject $object)
{
if ($this->getObjects()->contains($object)) {
$objectCategory = new ChildObjectCategory();
$objectCategory->setObject($object);
if ($object->isCategoriesLoaded()) {
//remove the back reference if available
$object->getCategories()->removeObject($this);
}
$objectCategory->setCategory($this);
$this->removeObjectCategory(clone $objectCategory);
$objectCategory->clear();
$this->collObjects->remove($this->collObjects->search($object));
if (null === $this->objectsScheduledForDeletion) {
$this->objectsScheduledForDeletion = clone $this->collObjects;
$this->objectsScheduledForDeletion->clear();
}
$this->objectsScheduledForDeletion->push($object);
}
return $this;
}
示例10: push
/**
* {@inheritdoc}
*/
public function push($value)
{
parent::push(func_get_args());
}
示例11: removeWine
/**
* Remove wine of this object
* through the tasted_wine cross reference table.
*
* @param ChildWine $wine
* @return ChildUser The current object (for fluent API support)
*/
public function removeWine(ChildWine $wine)
{
if ($this->getWines()->contains($wine)) {
$tastedWine = new ChildTastedWine();
$tastedWine->setWine($wine);
if ($wine->isUsersLoaded()) {
//remove the back reference if available
$wine->getUsers()->removeObject($this);
}
$tastedWine->setUser($this);
$this->removeTastedWine(clone $tastedWine);
$tastedWine->clear();
$this->collWines->remove($this->collWines->search($wine));
if (null === $this->winesScheduledForDeletion) {
$this->winesScheduledForDeletion = clone $this->collWines;
$this->winesScheduledForDeletion->clear();
}
$this->winesScheduledForDeletion->push($wine);
}
return $this;
}
示例12: removePermission
/**
* Remove permission of this object
* through the role_permission cross reference table.
*
* @param ChildPermission $permission
* @return ChildRole The current object (for fluent API support)
*/
public function removePermission(ChildPermission $permission)
{
if ($this->getPermissions()->contains($permission)) {
$rolePermission = new ChildRolePermission();
$rolePermission->setPermission($permission);
if ($permission->isRolesLoaded()) {
//remove the back reference if available
$permission->getRoles()->removeObject($this);
}
$rolePermission->setRole($this);
$this->removeRolePermission(clone $rolePermission);
$rolePermission->clear();
$this->collPermissions->remove($this->collPermissions->search($permission));
if (null === $this->permissionsScheduledForDeletion) {
$this->permissionsScheduledForDeletion = clone $this->collPermissions;
$this->permissionsScheduledForDeletion->clear();
}
$this->permissionsScheduledForDeletion->push($permission);
}
return $this;
}
示例13: removeXmlIssue
/**
* Remove xmlIssue of this object
* through the R_issues_xmlplugin cross reference table.
*
* @param ChildIssues $xmlIssue
* @return ChildPlugins The current object (for fluent API support)
*/
public function removeXmlIssue(ChildIssues $xmlIssue)
{
if ($this->getXmlIssues()->contains($xmlIssue)) {
$rIssuesXmlplugin = new ChildRIssuesXmlplugin();
$rIssuesXmlplugin->setXmlIssue($xmlIssue);
if ($xmlIssue->isXmlPluginsLoaded()) {
//remove the back reference if available
$xmlIssue->getXmlPlugins()->removeObject($this);
}
$rIssuesXmlplugin->setXmlPlugin($this);
$this->removeRIssuesXmlplugin(clone $rIssuesXmlplugin);
$rIssuesXmlplugin->clear();
$this->collXmlIssues->remove($this->collXmlIssues->search($xmlIssue));
if (null === $this->xmlIssuesScheduledForDeletion) {
$this->xmlIssuesScheduledForDeletion = clone $this->collXmlIssues;
$this->xmlIssuesScheduledForDeletion->clear();
}
$this->xmlIssuesScheduledForDeletion->push($xmlIssue);
}
return $this;
}
示例14: removeGroup
/**
* Remove group of this object
* through the kk_group_action cross reference table.
*
* @param ChildGroup $group
* @return ChildAction The current object (for fluent API support)
*/
public function removeGroup(ChildGroup $group)
{
if ($this->getGroups()->contains($group)) {
$groupAction = new ChildGroupAction();
$groupAction->setGroup($group);
if ($group->isActionsLoaded()) {
//remove the back reference if available
$group->getActions()->removeObject($this);
}
$groupAction->setAction($this);
$this->removeGroupAction(clone $groupAction);
$groupAction->clear();
$this->collGroups->remove($this->collGroups->search($group));
if (null === $this->groupsScheduledForDeletion) {
$this->groupsScheduledForDeletion = clone $this->collGroups;
$this->groupsScheduledForDeletion->clear();
}
$this->groupsScheduledForDeletion->push($group);
}
return $this;
}
示例15: removeLyric
/**
* Remove lyric of this object
* through the lyric_language cross reference table.
*
* @param ChildLyric $lyric
* @return ChildLanguage The current object (for fluent API support)
*/
public function removeLyric(ChildLyric $lyric)
{
if ($this->getLyrics()->contains($lyric)) {
$lyricLanguage = new LyricLanguage();
$lyricLanguage->setLyric($lyric);
if ($lyric->isLanguagesLoaded()) {
//remove the back reference if available
$lyric->getLanguages()->removeObject($this);
}
$lyricLanguage->setLanguage($this);
$this->removeLyricLanguage(clone $lyricLanguage);
$lyricLanguage->clear();
$this->collLyrics->remove($this->collLyrics->search($lyric));
if (null === $this->lyricsScheduledForDeletion) {
$this->lyricsScheduledForDeletion = clone $this->collLyrics;
$this->lyricsScheduledForDeletion->clear();
}
$this->lyricsScheduledForDeletion->push($lyric);
}
return $this;
}