<?php /*PLEASE DO NOT EDIT THIS CODE*/ /*This code was generated using the UMPLE 1.35.0.7523.c616a4dce modeling language!*/ class OneToMany { //------------------------ // MEMBER VARIABLES //------------------------ //OneToMany Associations private $oneToMany; //------------------------ // CONSTRUCTOR //------------------------ public function __construct($aOneToMany) { if (!$this->setOneToMany($aOneToMany)) { throw new Exception("Unable to create OneToMany due to aOneToMany. See https://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"); } } //------------------------ // INTERFACE //------------------------ public function getOneToMany() { return $this->oneToMany; } public function setOneToMany($aNewOneToMany) { $wasSet = false; if ($aNewOneToMany != null) { $this->oneToMany = $aNewOneToMany; $wasSet = true; } return $wasSet; } public function equals($compareTo) { return $this == $compareTo; } public function delete() { $this->oneToMany = null; } } ?> <?php /*PLEASE DO NOT EDIT THIS CODE*/ /*This code was generated using the UMPLE 1.35.0.7523.c616a4dce modeling language!*/ class Student { //------------------------ // MEMBER VARIABLES //------------------------ //Student Attributes private $number; //Student Associations private $pupil; private $ta; //------------------------ // CONSTRUCTOR //------------------------ public function __construct($aNumber) { $this->number = $aNumber; } //------------------------ // INTERFACE //------------------------ public function setNumber($aNumber) { $wasSet = false; $this->number = $aNumber; $wasSet = true; return $wasSet; } public function getNumber() { return $this->number; } public function getPupil() { return $this->pupil; } public function hasPupil() { $has = $this->pupil != null; return $has; } public function getTa() { return $this->ta; } public function hasTa() { $has = $this->ta != null; return $has; } public function setPupil($aNewPupil) { $wasSet = false; if ($aNewPupil == null) { $existingPupil = $this->pupil; $this->pupil = null; if ($existingPupil != null && $existingPupil->getTa() != null) { $existingPupil->setTa(null); } $wasSet = true; return $wasSet; } $currentPupil = $this->getPupil(); if ($currentPupil != null && $currentPupil != $aNewPupil) { $currentPupil->setTa(null); } $this->pupil = $aNewPupil; $existingTa = $aNewPupil->getTa(); if ($this != $existingTa) { $aNewPupil->setTa($this); } $wasSet = true; return $wasSet; } public function setTa($aNewTa) { $wasSet = false; if ($aNewTa == null) { $existingTa = $this->ta; $this->ta = null; if ($existingTa != null && $existingTa->getPupil() != null) { $existingTa->setPupil(null); } $wasSet = true; return $wasSet; } $currentTa = $this->getTa(); if ($currentTa != null && $currentTa != $aNewTa) { $currentTa->setPupil(null); } $this->ta = $aNewTa; $existingPupil = $aNewTa->getPupil(); if ($this != $existingPupil) { $aNewTa->setPupil($this); } $wasSet = true; return $wasSet; } public function equals($compareTo) { return $this == $compareTo; } public function delete() { if ($this->pupil != null) { $this->pupil->setTa(null); } if ($this->ta != null) { $this->ta->setPupil(null); } } } ?> <?php /*PLEASE DO NOT EDIT THIS CODE*/ /*This code was generated using the UMPLE 1.35.0.7523.c616a4dce modeling language!*/ class OneSymmetric { //------------------------ // MEMBER VARIABLES //------------------------ //OneSymmetric Attributes private $name; private $number; //OneSymmetric Associations private $friend; //------------------------ // CONSTRUCTOR //------------------------ public function __construct($aName = null, $aNumber = null, $aFriend = null) { if (func_num_args() == 0) { return; } $this->name = $aName; $this->number = $aNumber; if ($aFriend == null || $aFriend->getFriend() != null) { throw new Exception("Unable to create OneSymmetric due to aFriend. See https://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"); } $this->friend = $aFriend; } public static function newInstance($aName, $aNumber, $aNameForFriend, $aNumberForFriend) { $thisInstance = new OneSymmetric(); $thisInstance->name = $aName; $thisInstance->number = $aNumber; $thisInstance->friend = new OneSymmetric($aNameForFriend, $aNumberForFriend, $thisInstance); return $thisInstance; } //------------------------ // INTERFACE //------------------------ public function setName($aName) { $wasSet = false; $this->name = $aName; $wasSet = true; return $wasSet; } public function setNumber($aNumber) { $wasSet = false; $this->number = $aNumber; $wasSet = true; return $wasSet; } public function getName() { return $this->name; } public function getNumber() { return $this->number; } public function getFriend() { return $this->friend; } public function equals($compareTo) { return $this == $compareTo; } public function delete() { $existingFriend = $this->friend; $this->friend = null; if ($existingFriend != null) { $existingFriend->delete(); } } } ?> <?php /*PLEASE DO NOT EDIT THIS CODE*/ /*This code was generated using the UMPLE 1.35.0.7523.c616a4dce modeling language!*/ class OneSymmetricNoParam { //------------------------ // MEMBER VARIABLES //------------------------ //OneSymmetricNoParam Associations private $friend; //------------------------ // CONSTRUCTOR //------------------------ public function __construct($aFriend = null) { if (func_num_args() == 0) { return; } if ($aFriend == null || $aFriend->getFriend() != null) { throw new Exception("Unable to create OneSymmetricNoParam due to aFriend. See https://manual.umple.org?RE002ViolationofAssociationMultiplicity.html"); } $this->friend = $aFriend; } public static function newInstance() { $thisInstance = new OneSymmetricNoParam(); $thisInstance->friend = new OneSymmetricNoParam($thisInstance); return $thisInstance; } //------------------------ // INTERFACE //------------------------ public function getFriend() { return $this->friend; } public function equals($compareTo) { return $this == $compareTo; } public function delete() { $existingFriend = $this->friend; $this->friend = null; if ($existingFriend != null) { $existingFriend->delete(); } } } ?> <?php /*PLEASE DO NOT EDIT THIS CODE*/ /*This code was generated using the UMPLE 1.35.0.7523.c616a4dce modeling language!*/ class Mentor { //------------------------ // MEMBER VARIABLES //------------------------ //Mentor Attributes private $name; //Mentor Associations private $superMentor; //------------------------ // CONSTRUCTOR //------------------------ public function __construct($aName) { $this->name = $aName; } //------------------------ // INTERFACE //------------------------ public function setName($aName) { $wasSet = false; $this->name = $aName; $wasSet = true; return $wasSet; } public function getName() { return $this->name; } public function getSuperMentor() { return $this->superMentor; } public function hasSuperMentor() { $has = $this->superMentor != null; return $has; } public function setSuperMentor($aNewSuperMentor) { $wasSet = false; if ($aNewSuperMentor == null) { $existingSuperMentor = $this->superMentor; $this->superMentor = null; if ($existingSuperMentor != null && $existingSuperMentor->getSuperMentor() != null) { $existingSuperMentor->setSuperMentor(null); } $wasSet = true; return $wasSet; } $currentSuperMentor = $this->getSuperMentor(); if ($currentSuperMentor != null && $currentSuperMentor != $aNewSuperMentor) { $currentSuperMentor->setSuperMentor(null); } $this->superMentor = $aNewSuperMentor; $existingSuperMentor = $aNewSuperMentor->getSuperMentor(); if ($this != $existingSuperMentor) { $aNewSuperMentor->setSuperMentor($this); } $wasSet = true; return $wasSet; } public function equals($compareTo) { return $this == $compareTo; } public function delete() { if ($this->superMentor != null) { $this->superMentor->setSuperMentor(null); } } } ?>