<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
abstract class Student
{
//------------------------
// MEMBER VARIABLES
//------------------------
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct()
{}
//------------------------
// INTERFACE
//------------------------
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class Object
{
//------------------------
// MEMBER VARIABLES
//------------------------
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct()
{}
//------------------------
// INTERFACE
//------------------------
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
public function example_obj(Object $g)
{
/*implementation*/
}
public function example_bool($b)
{
}
public function example_int($i)
{
}
public function example_float($f)
{
}
public function example_double($d)
{
}
public function example_string($s)
{
}
public function example_obj_array($gs)
{
}
public function example_primitive_array($is)
{
}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class Student
{
//------------------------
// MEMBER VARIABLES
//------------------------
//Student Attributes
private $number;
private $number2;
//Helper Variables
private $canSetNumber2;
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct($aNumber)
{
$this->number = $aNumber;
$this->canSetNumber2 = true;
}
//------------------------
// INTERFACE
//------------------------
public function setNumber2($aNumber2)
{
$wasSet = false;
if (!$this->canSetNumber2) { return false; }
$this->canSetNumber2 = false;
$this->number2 = $aNumber2;
$wasSet = true;
return $wasSet;
}
public function getNumber()
{
return $this->number;
}
public function getNumber2()
{
return $this->number2;
}
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class Mentor
{
//------------------------
// MEMBER VARIABLES
//------------------------
//Mentor Attributes
private $capacity;
private $id;
private $name;
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct($aCapacity, $aId, $aName)
{
$this->capacity = $aCapacity;
$this->id = $aId;
$this->name = $aName;
}
public function __construct()
{
$this->capacity = "31";
$this->name = "Umple";
}
//------------------------
// INTERFACE
//------------------------
public function setCapacity($aCapacity)
{
$wasSet = false;
$this->capacity = $aCapacity;
$wasSet = true;
return $wasSet;
}
public function setId($aId)
{
$wasSet = false;
$this->id = $aId;
$wasSet = true;
return $wasSet;
}
public function setName($aName)
{
$wasSet = false;
$this->name = $aName;
$wasSet = true;
return $wasSet;
}
public function getCapacity()
{
return $this->capacity;
}
public function getId()
{
return $this->id;
}
public function getName()
{
return $this->name;
}
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class Router implements NetworkNode
{
//------------------------
// MEMBER VARIABLES
//------------------------
//Router Attributes
private $ipAddress;
//Router State Machines
private static $StatusDisconnected = 1;
private static $StatusConnected = 2;
private $status;
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct($aIpAddress)
{
$this->ipAddress = $aIpAddress;
$this->setStatus(self::$StatusDisconnected);
}
//------------------------
// INTERFACE
//------------------------
public function getStatusFullName()
{
$answer = $this->getStatus();
return $answer;
}
public function getStatus()
{
if ($this->status == self::$StatusDisconnected) { return "StatusDisconnected"; }
elseif ($this->status == self::$StatusConnected) { return "StatusConnected"; }
return null;
}
public function createConnection()
{
$wasEventProcessed = false;
$aStatus = $this->status;
if ($aStatus == self::$StatusDisconnected)
{
$this->setStatus(self::$StatusConnected);
$wasEventProcessed = true;
}
return $wasEventProcessed;
}
public function disconnectRequest()
{
$wasEventProcessed = false;
$aStatus = $this->status;
if ($aStatus == self::$StatusConnected)
{
$this->setStatus(self::$StatusDisconnected);
$wasEventProcessed = true;
}
return $wasEventProcessed;
}
private function setStatus($aStatus)
{
$this->status = $aStatus;
}
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
public function connect()
{
return "";
}
public function disconnect()
{
return "";
}
public function errorDetected()
{
return "";
}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class Mentor
{
//------------------------
// MEMBER VARIABLES
//------------------------
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct()
{}
//------------------------
// INTERFACE
//------------------------
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class Router implements NetworkNode
{
//------------------------
// MEMBER VARIABLES
//------------------------
//Router Attributes
private $ipAddress;
//Router State Machines
private static $StatusDisconnected = 1;
private static $StatusConnected = 2;
private $status;
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct($aIpAddress)
{
$this->ipAddress = $aIpAddress;
$this->setStatus(self::$StatusDisconnected);
}
//------------------------
// INTERFACE
//------------------------
public function getStatusFullName()
{
$answer = $this->getStatus();
return $answer;
}
public function getStatus()
{
if ($this->status == self::$StatusDisconnected) { return "StatusDisconnected"; }
elseif ($this->status == self::$StatusConnected) { return "StatusConnected"; }
return null;
}
public function connect()
{
$wasEventProcessed = false;
$aStatus = $this->status;
if ($aStatus == self::$StatusDisconnected)
{
$this->setStatus(self::$StatusConnected);
$wasEventProcessed = true;
}
return $wasEventProcessed;
}
public function disconnect()
{
$wasEventProcessed = false;
$aStatus = $this->status;
if ($aStatus == self::$StatusConnected)
{
$this->setStatus(self::$StatusDisconnected);
$wasEventProcessed = true;
}
return $wasEventProcessed;
}
public function errorDetected()
{
$wasEventProcessed = false;
$aStatus = $this->status;
if ($aStatus == self::$StatusConnected)
{
$this->setStatus(self::$StatusDisconnected);
$wasEventProcessed = true;
}
return $wasEventProcessed;
}
private function setStatus($aStatus)
{
$this->status = $aStatus;
}
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class Router implements NetworkNode
{
//------------------------
// MEMBER VARIABLES
//------------------------
//Router Attributes
private $ipAddress;
//Router State Machines
private static $StatusDisconnected = 1;
private static $StatusConnected = 2;
private $status;
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct($aIpAddress)
{
$this->ipAddress = $aIpAddress;
$this->setStatus(self::$StatusDisconnected);
}
//------------------------
// INTERFACE
//------------------------
public function getStatusFullName()
{
$answer = $this->getStatus();
return $answer;
}
public function getStatus()
{
if ($this->status == self::$StatusDisconnected) { return "StatusDisconnected"; }
elseif ($this->status == self::$StatusConnected) { return "StatusConnected"; }
return null;
}
public function connect()
{
$wasEventProcessed = false;
$aStatus = $this->status;
if ($aStatus == self::$StatusDisconnected)
{
$this->setStatus(self::$StatusConnected);
$wasEventProcessed = true;
}
return $wasEventProcessed;
}
public function disconnect()
{
$wasEventProcessed = false;
$aStatus = $this->status;
if ($aStatus == self::$StatusConnected)
{
$this->setStatus(self::$StatusDisconnected);
$wasEventProcessed = true;
}
return $wasEventProcessed;
}
private function setStatus($aStatus)
{
$this->status = $aStatus;
}
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
public function errorDetected()
{
return "";
}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class Mentor
{
//------------------------
// MEMBER VARIABLES
//------------------------
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct()
{}
//------------------------
// INTERFACE
//------------------------
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
public function showMe()
{
}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class Student
{
//------------------------
// MEMBER VARIABLES
//------------------------
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct()
{}
//------------------------
// INTERFACE
//------------------------
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class Student
{
//------------------------
// MEMBER VARIABLES
//------------------------
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct()
{}
//------------------------
// INTERFACE
//------------------------
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
public function foo(int $a)
{
// line 22 "ClassTemplateTest_CodeInjectionsParametersUnspecified.ump"
System.out.println("Starting foo...");
// END OF UMPLE BEFORE INJECTION
if(a < 0) {
// line 18 "ClassTemplateTest_CodeInjectionsParametersUnspecified.ump"
System.out.println("Returning from foo, a: " + a);
// END OF UMPLE AFTER INJECTION
return 4;
}
// line 18 "ClassTemplateTest_CodeInjectionsParametersUnspecified.ump"
System.out.println("Returning from foo, a: " + a);
// END OF UMPLE AFTER INJECTION
return 3;
}
public function foo(int $a, $b)
{
// line 22 "ClassTemplateTest_CodeInjectionsParametersUnspecified.ump"
System.out.println("Starting foo...");
// END OF UMPLE BEFORE INJECTION
if(a > 0 && "".equals(b)) {
// line 18 "ClassTemplateTest_CodeInjectionsParametersUnspecified.ump"
System.out.println("Returning from foo, a: " + a);
// END OF UMPLE AFTER INJECTION
return 3;
}
// line 18 "ClassTemplateTest_CodeInjectionsParametersUnspecified.ump"
System.out.println("Returning from foo, a: " + a);
// END OF UMPLE AFTER INJECTION
return 1;
}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class Mentor
{
//------------------------
// STATIC VARIABLES
//------------------------
public static $MAX = 100;
public static $MIN = -99;
public static $HELLO = "Hello";
private static $nextX = 1;
private static $mentorsById = array();
//------------------------
// MEMBER VARIABLES
//------------------------
//Mentor Attributes
private $str;
private $str2;
private $someName;
private $lDoub;
private $lBool;
private $name;
private $d;
private $t;
private $i;
private $id;
private $p;
private $q;
private $r;
private $s;
private $tt;
private $u;
private $v;
private $w;
//Autounique Attributes
private $x;
//Helper Variables
private $canSetStr2;
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct($aStr, $aD, $aI, $aId)
{
$this->str = $aStr;
$this->canSetStr2 = true;
$this->someName = NULL;
$this->lDoub = 0;
$this->lBool = false;
$this->name = "Johannes";
$this->d = $aD;
$this->t = new Time();
$this->i = $aI;
$this->resetP();
$this->q = "chicken";
$this->resetR();
$this->s = "123";
$this->tt = date("y-m-d", strtotime("1978-12-25"));
$this->u = date("h:i:s", strtotime("12:13:14"));
$this->resetV();
$this->resetW();
$this->x = self::$nextX++;
if (!$this->setId($aId))
{
throw new RuntimeException("Cannot create due to duplicate id. See http://manual.umple.org?RE003ViolationofUniqueness.html");
}
}
//------------------------
// INTERFACE
//------------------------
public function setStr2($aStr2)
{
$wasSet = false;
if (!$this->canSetStr2) { return false; }
$this->canSetStr2 = false;
$this->str2 = $aStr2;
$wasSet = true;
return $wasSet;
}
public function setSomeName($aSomeName)
{
$wasSet = false;
$this->someName = $aSomeName;
$wasSet = true;
return $wasSet;
}
public function setLDoub($aLDoub)
{
$wasSet = false;
$this->lDoub = $aLDoub;
$wasSet = true;
return $wasSet;
}
public function setLBool($aLBool)
{
$wasSet = false;
$this->lBool = $aLBool;
$wasSet = true;
return $wasSet;
}
public function setName($aName)
{
$wasSet = false;
$this->name = $aName;
$wasSet = true;
return $wasSet;
}
public function setD($aD)
{
$wasSet = false;
$this->d = $aD;
$wasSet = true;
return $wasSet;
}
public function setI($aI)
{
$wasSet = false;
$this->i = $aI;
$wasSet = true;
return $wasSet;
}
public function setId($aId)
{
$wasSet = false;
if (isset($this->id)) {
$anOldId = $this->getId();
}
if (isset($anOldId) && $anOldId === $aId) {
return true;
}
if (Mentor::hasWithId($aId)) {
return $wasSet;
}
$this->id = $aId;
$wasSet = true;
if (isset($anOldId)) {
unset(Mentor::$mentorsById[(string)$anOldId]);
}
Mentor::$mentorsById[(string)$aId] = $this;
return $wasSet;
}
public function setP($aP)
{
$wasSet = false;
$this->p = $aP;
$wasSet = true;
return $wasSet;
}
public function resetP()
{
$wasReset = false;
$this->p = $this->getDefaultP();
$wasReset = true;
return $wasReset;
}
public function setQ($aQ)
{
$wasSet = false;
$this->q = $aQ;
$wasSet = true;
return $wasSet;
}
public function setR($aR)
{
$wasSet = false;
$this->r = $aR;
$wasSet = true;
return $wasSet;
}
public function resetR()
{
$wasReset = false;
$this->r = $this->getDefaultR();
$wasReset = true;
return $wasReset;
}
public function setTt($aTt)
{
$wasSet = false;
$this->tt = $aTt;
$wasSet = true;
return $wasSet;
}
public function setU($aU)
{
$wasSet = false;
$this->u = $aU;
$wasSet = true;
return $wasSet;
}
public function setV($aV)
{
$wasSet = false;
$this->v = $aV;
$wasSet = true;
return $wasSet;
}
public function resetV()
{
$wasReset = false;
$this->v = $this->getDefaultV();
$wasReset = true;
return $wasReset;
}
public function setW($aW)
{
$wasSet = false;
$this->w = $aW;
$wasSet = true;
return $wasSet;
}
public function resetW()
{
$wasReset = false;
$this->w = $this->getDefaultW();
$wasReset = true;
return $wasReset;
}
public function getStr()
{
return $this->str;
}
public function getStr2()
{
return $this->str2;
}
public function getSomeName()
{
return $this->someName;
}
public function getLDoub()
{
return $this->lDoub;
}
public function getLBool()
{
return $this->lBool;
}
public function getName()
{
return $this->name;
}
public function getD()
{
return $this->d;
}
public function getI()
{
return $this->i;
}
public function getDerivedTwiceI()
{
return i*2;
}
public function getId()
{
return $this->id;
}
public static function getWithId($aId)
{
return Mentor::$mentorsById[(string)$aId];
}
public static function hasWithId($aId)
{
return array_key_exists((string)$aId, Mentor::$mentorsById);
}
public function getP()
{
return $this->p;
}
public function getDefaultP()
{
return "robot";
}
public function getQ()
{
return $this->q;
}
public function getR()
{
return $this->r;
}
public function getDefaultR()
{
return "";
}
public function getS()
{
return $this->s;
}
public function getTt()
{
return $this->tt;
}
public function getU()
{
return $this->u;
}
public function getV()
{
return $this->v;
}
public function getDefaultV()
{
return date("y-m-d", strtotime("1978-12-26"));
}
public function getW()
{
return $this->w;
}
public function getDefaultW()
{
return date("h:i:s", strtotime("12:59:59"));
}
public function getX()
{
return $this->x;
}
public function isLBool()
{
return $this->lBool;
}
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{
unset(Mentor::$mentorsById[(string)$this->getId()]);
}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class Foo
{
//------------------------
// MEMBER VARIABLES
//------------------------
//Foo Attributes
private $someStrings;
private $numbers;
private $objects;
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct()
{
$this->someStrings = array("a","b","c");
$this->numbers = array(1,2,3,10);
$this->objects = array(new Token("first"),new Token("second"));
}
//------------------------
// INTERFACE
//------------------------
public function addSomeString($aSomeString)
{
$wasAdded = false;
$this->someStrings[] = $aSomeString;
$wasAdded = true;
return $wasAdded;
}
public function removeSomeString($aSomeString)
{
$wasRemoved = false;
unset($this->someStrings[$this->indexOfSomeString($aSomeString)]);
$this->someStrings = array_values($this->someStrings);
$wasRemoved = true;
return $wasRemoved;
}
public function addNumber($aNumber)
{
$wasAdded = false;
$this->numbers[] = $aNumber;
$wasAdded = true;
return $wasAdded;
}
public function removeNumber($aNumber)
{
$wasRemoved = false;
unset($this->numbers[$this->indexOfNumber($aNumber)]);
$this->numbers = array_values($this->numbers);
$wasRemoved = true;
return $wasRemoved;
}
public function addObject($aObject)
{
$wasAdded = false;
$this->objects[] = $aObject;
$wasAdded = true;
return $wasAdded;
}
public function removeObject($aObject)
{
$wasRemoved = false;
unset($this->objects[$this->indexOfObject($aObject)]);
$this->objects = array_values($this->objects);
$wasRemoved = true;
return $wasRemoved;
}
public function getSomeString($index)
{
$aSomeString = $this->someStrings[$index];
return $aSomeString;
}
public function getSomeStrings()
{
$newSomeStrings = $this->someStrings;
return $newSomeStrings;
}
public function numberOfSomeStrings()
{
$number = count($this->someStrings);
return $number;
}
public function hasSomeStrings()
{
$has = someStrings.size() > 0;
return $has;
}
public function indexOfSomeString($aSomeString)
{
$rawAnswer = array_search($aSomeString,$this->someStrings);
$index = $rawAnswer == null && $rawAnswer !== 0 ? -1 : $rawAnswer;
return $index;
}
public function getNumber($index)
{
$aNumber = $this->numbers[$index];
return $aNumber;
}
public function getNumbers()
{
$newNumbers = $this->numbers;
return $newNumbers;
}
public function numberOfNumbers()
{
$number = count($this->numbers);
return $number;
}
public function hasNumbers()
{
$has = numbers.size() > 0;
return $has;
}
public function indexOfNumber($aNumber)
{
$rawAnswer = array_search($aNumber,$this->numbers);
$index = $rawAnswer == null && $rawAnswer !== 0 ? -1 : $rawAnswer;
return $index;
}
public function getObject($index)
{
$aObject = $this->objects[$index];
return $aObject;
}
public function getObjects()
{
$newObjects = $this->objects;
return $newObjects;
}
public function numberOfObjects()
{
$number = count($this->objects);
return $number;
}
public function hasObjects()
{
$has = objects.size() > 0;
return $has;
}
public function indexOfObject($aObject)
{
$rawAnswer = array_search($aObject,$this->objects);
$index = $rawAnswer == null && $rawAnswer !== 0 ? -1 : $rawAnswer;
return $index;
}
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
// This is a student
class Student
{
//------------------------
// MEMBER VARIABLES
//------------------------
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct()
{}
//------------------------
// INTERFACE
//------------------------
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class Foo
{
//------------------------
// MEMBER VARIABLES
//------------------------
//Foo Associations
/**
* I am a multiline comment above an association.
*/
private $bars;
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct()
{
$this->bars = array();
}
//------------------------
// INTERFACE
//------------------------
public function getBar_index($index)
{
$aBar = $this->bars[$index];
return $aBar;
}
public function getBars()
{
$newBars = $this->bars;
return $newBars;
}
public function numberOfBars()
{
$number = count($this->bars);
return $number;
}
public function hasBars()
{
$has = $this->numberOfBars() > 0;
return $has;
}
public function indexOfBar($aBar)
{
$wasFound = false;
$index = 0;
foreach($this->bars as $bar)
{
if ($bar->equals($aBar))
{
$wasFound = true;
break;
}
$index += 1;
}
$index = $wasFound ? $index : -1;
return $index;
}
public static function minimumNumberOfBars()
{
return 0;
}
public function addBarVia()
{
return new Bar($this);
}
public function addBar($aBar)
{
$wasAdded = false;
if ($this->indexOfBar($aBar) !== -1) { return false; }
$existingFoo = $aBar->getFoo();
$isNewFoo = $existingFoo != null && $this !== $existingFoo;
if ($isNewFoo)
{
$aBar->setFoo($this);
}
else
{
$this->bars[] = $aBar;
}
$wasAdded = true;
return $wasAdded;
}
public function removeBar($aBar)
{
$wasRemoved = false;
//Unable to remove aBar, as it must always have a foo
if ($this !== $aBar->getFoo())
{
unset($this->bars[$this->indexOfBar($aBar)]);
$this->bars = array_values($this->bars);
$wasRemoved = true;
}
return $wasRemoved;
}
public function addBarAt($aBar, $index)
{
$wasAdded = false;
if($this->addBar($aBar))
{
if($index < 0 ) { $index = 0; }
if($index > $this->numberOfBars()) { $index = $this->numberOfBars() - 1; }
array_splice($this->bars, $this->indexOfBar($aBar), 1);
array_splice($this->bars, $index, 0, array($aBar));
$wasAdded = true;
}
return $wasAdded;
}
public function addOrMoveBarAt($aBar, $index)
{
$wasAdded = false;
if($this->indexOfBar($aBar) !== -1)
{
if($index < 0 ) { $index = 0; }
if($index > $this->numberOfBars()) { $index = $this->numberOfBars() - 1; }
array_splice($this->bars, $this->indexOfBar($aBar), 1);
array_splice($this->bars, $index, 0, array($aBar));
$wasAdded = true;
}
else
{
$wasAdded = $this->addBarAt($aBar, $index);
}
return $wasAdded;
}
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{
foreach ($this->bars as $aBar)
{
$aBar->delete();
}
}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class Student
{
//------------------------
// MEMBER VARIABLES
//------------------------
//Student Attributes
private $grade;
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct()
{
$this->grade = "";
}
//------------------------
// INTERFACE
//------------------------
public function setGrade($aGrade)
{
$wasSet = false;
$this->grade = $aGrade;
$wasSet = true;
return $wasSet;
}
public function getGrade()
{
return $this->grade;
}
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class Token
{
//------------------------
// MEMBER VARIABLES
//------------------------
//Token Attributes
private $p;
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct($aP)
{
$this->p = $aP;
}
//------------------------
// INTERFACE
//------------------------
public function setP($aP)
{
$wasSet = false;
$this->p = $aP;
$wasSet = true;
return $wasSet;
}
public function getP()
{
return $this->p;
}
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
// This is a student
// Multiple comments
// on several lines
class Student
{
//------------------------
// MEMBER VARIABLES
//------------------------
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct()
{}
//------------------------
// INTERFACE
//------------------------
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
/*
* I am a class comment.
*
* Notice how there are 4 empty lines below me.
*
*
*
*
* And 2 below me.
*
*
* These lines should come out as we see here.
* Comments such as these are often used to improve readability through whitespace clarity.
*/
class Foo
{
//------------------------
// MEMBER VARIABLES
//------------------------
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct()
{}
//------------------------
// INTERFACE
//------------------------
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class Foo
{
//------------------------
// MEMBER VARIABLES
//------------------------
//Foo Attributes
/**
* I am a multiline comment above an attribute.
*/
private $name;
//------------------------
// 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 equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class Token
{
//------------------------
// MEMBER VARIABLES
//------------------------
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct()
{}
//------------------------
// INTERFACE
//------------------------
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class Foo
{
//------------------------
// MEMBER VARIABLES
//------------------------
//Foo Attributes
/**
* Inline comment above attribute.
*/
private $testAttribute1;
/**
* Multiple inline comments
* above attribute.
*/
private $testAttribute2;
/**
* Multiline comment above attribute.
*/
private $testAttribute3;
/**
* Multiple multiline comments
* above attribute.
*/
private $testAttribute4;
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct($aTestAttribute1, $aTestAttribute2, $aTestAttribute3, $aTestAttribute4)
{
$this->testAttribute1 = $aTestAttribute1;
$this->testAttribute2 = $aTestAttribute2;
$this->testAttribute3 = $aTestAttribute3;
$this->testAttribute4 = $aTestAttribute4;
}
//------------------------
// INTERFACE
//------------------------
public function setTestAttribute1($aTestAttribute1)
{
$wasSet = false;
$this->testAttribute1 = $aTestAttribute1;
$wasSet = true;
return $wasSet;
}
public function setTestAttribute2($aTestAttribute2)
{
$wasSet = false;
$this->testAttribute2 = $aTestAttribute2;
$wasSet = true;
return $wasSet;
}
public function setTestAttribute3($aTestAttribute3)
{
$wasSet = false;
$this->testAttribute3 = $aTestAttribute3;
$wasSet = true;
return $wasSet;
}
public function setTestAttribute4($aTestAttribute4)
{
$wasSet = false;
$this->testAttribute4 = $aTestAttribute4;
$wasSet = true;
return $wasSet;
}
public function getTestAttribute1()
{
return $this->testAttribute1;
}
public function getTestAttribute2()
{
return $this->testAttribute2;
}
public function getTestAttribute3()
{
return $this->testAttribute3;
}
public function getTestAttribute4()
{
return $this->testAttribute4;
}
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class Student
{
//------------------------
// MEMBER VARIABLES
//------------------------
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct()
{}
//------------------------
// INTERFACE
//------------------------
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
public function foo(int $a)
{
// line 25 "ClassTemplateTest_CodeInjectionsComments.ump"
System.out.println("Starting foo with argument: " + a);
// END OF UMPLE BEFORE INJECTION
if(a < 0) {
/*
{
*/
// line 29 "ClassTemplateTest_CodeInjectionsComments.ump"
System.out.println("Returning from foo!");
// END OF UMPLE AFTER INJECTION
return 0;
}
else if(a == 1) {
// foo()
// line 29 "ClassTemplateTest_CodeInjectionsComments.ump"
System.out.println("Returning from foo!");
// END OF UMPLE AFTER INJECTION
return -1;
}
else {
// {
// line 29 "ClassTemplateTest_CodeInjectionsComments.ump"
System.out.println("Returning from foo!");
// END OF UMPLE AFTER INJECTION
return 4;
}
for(int i = 0; i < a; i++) {
// TODO: call foo()
if(i == a/4) {
// line 29 "ClassTemplateTest_CodeInjectionsComments.ump"
System.out.println("Returning from foo!");
// END OF UMPLE AFTER INJECTION
return a;
}
}
// line 29 "ClassTemplateTest_CodeInjectionsComments.ump"
System.out.println("Returning from foo!");
// END OF UMPLE AFTER INJECTION
return 4;
}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class SubMentor extends Mentor
{
//------------------------
// MEMBER VARIABLES
//------------------------
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct($aName)
{
parent::__construct($aName);
}
//------------------------
// INTERFACE
//------------------------
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{
parent::delete();
}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class SubMentor2 extends Mentor
{
//------------------------
// MEMBER VARIABLES
//------------------------
//SubMentor2 Attributes
private $subName;
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct($aName, $aSubName)
{
parent::__construct($aName);
$this->subName = $aSubName;
}
//------------------------
// INTERFACE
//------------------------
public function setSubName($aSubName)
{
$wasSet = false;
$this->subName = $aSubName;
$wasSet = true;
return $wasSet;
}
public function getSubName()
{
return $this->subName;
}
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{
parent::delete();
}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class Token
{
//------------------------
// MEMBER VARIABLES
//------------------------
//Token Attributes
private $positions;
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct()
{
$this->positions = array();
}
//------------------------
// INTERFACE
//------------------------
public function addPosition($aPosition)
{
$wasAdded = false;
$this->positions[] = $aPosition;
$wasAdded = true;
return $wasAdded;
}
public function removePosition($aPosition)
{
$wasRemoved = false;
unset($this->positions[$this->indexOfPosition($aPosition)]);
$this->positions = array_values($this->positions);
$wasRemoved = true;
return $wasRemoved;
}
public function getPosition($index)
{
$aPosition = $this->positions[$index];
return $aPosition;
}
public function getPositions()
{
$newPositions = $this->positions;
return $newPositions;
}
public function numberOfPositions()
{
$number = count($this->positions);
return $number;
}
public function hasPositions()
{
$has = positions.size() > 0;
return $has;
}
public function indexOfPosition($aPosition)
{
$rawAnswer = array_search($aPosition,$this->positions);
$index = $rawAnswer == null && $rawAnswer !== 0 ? -1 : $rawAnswer;
return $index;
}
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class Student
{
//------------------------
// MEMBER VARIABLES
//------------------------
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct()
{}
//------------------------
// INTERFACE
//------------------------
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
public function foo(int $a)
{
// line 17 "ClassTemplateTest_CodeInjectionsBasic.ump"
System.out.println("Starting foo with argument: " + a);
// END OF UMPLE BEFORE INJECTION
if(a < 0) {
// line 21 "ClassTemplateTest_CodeInjectionsBasic.ump"
System.out.println("Returning from foo!");
// END OF UMPLE AFTER INJECTION
return 0;
}
for(int i = 0; i < a; i++) {
if(i == a/4) {
// line 21 "ClassTemplateTest_CodeInjectionsBasic.ump"
System.out.println("Returning from foo!");
// END OF UMPLE AFTER INJECTION
return a;
}
}
// line 21 "ClassTemplateTest_CodeInjectionsBasic.ump"
System.out.println("Returning from foo!");
// END OF UMPLE AFTER INJECTION
return 4;
}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class Student
{
//------------------------
// MEMBER VARIABLES
//------------------------
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct()
{}
//------------------------
// INTERFACE
//------------------------
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
public function foo(int $a)
{
// line 26 "ClassTemplateTest_CodeInjectionsParametersMulti.ump"
System.out.println("Starting foo...");
// END OF UMPLE BEFORE INJECTION
// line 38 "ClassTemplateTest_CodeInjectionsParametersMulti.ump"
System.out.println("Starting execution...");
// END OF UMPLE BEFORE INJECTION
if(a < 0) {
return 4;
}
return 3;
}
public function foo(int $a, $b)
{
// line 26 "ClassTemplateTest_CodeInjectionsParametersMulti.ump"
System.out.println("Starting foo...");
// END OF UMPLE BEFORE INJECTION
if(a > 0 && "".equals(b)) {
// line 30 "ClassTemplateTest_CodeInjectionsParametersMulti.ump"
System.out.println("Returning from foo, a: " + a ", b: " + b);
// END OF UMPLE AFTER INJECTION
return 3;
}
// line 30 "ClassTemplateTest_CodeInjectionsParametersMulti.ump"
System.out.println("Returning from foo, a: " + a ", b: " + b);
// END OF UMPLE AFTER INJECTION
return 1;
}
public function bar()
{
// line 34 "ClassTemplateTest_CodeInjectionsParametersMulti.ump"
// TODO: fix asap
// END OF UMPLE BEFORE INJECTION
// line 38 "ClassTemplateTest_CodeInjectionsParametersMulti.ump"
System.out.println("Starting execution...");
// END OF UMPLE BEFORE INJECTION
int a = 4;
if(a == 3) return 2;
return 1;
}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class Student
{
//------------------------
// MEMBER VARIABLES
//------------------------
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct()
{}
//------------------------
// INTERFACE
//------------------------
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
public function foo(int $a)
{
// line 18 "ClassTemplateTest_CodeInjectionsNoBraces.ump"
System.out.println("Starting foo with argument: " + a);
// END OF UMPLE BEFORE INJECTION
if(a < 0) {
// line 22 "ClassTemplateTest_CodeInjectionsNoBraces.ump"
System.out.println("Returning from foo!");
// END OF UMPLE AFTER INJECTION
return 0;
}
else if(a == 1) {
// line 22 "ClassTemplateTest_CodeInjectionsNoBraces.ump"
System.out.println("Returning from foo!");
// END OF UMPLE AFTER INJECTION
return -1;
}
else {
// line 22 "ClassTemplateTest_CodeInjectionsNoBraces.ump"
System.out.println("Returning from foo!");
// END OF UMPLE AFTER INJECTION
return 4;
}
for(int i = 0; i < a; i++)
if(i == a/4) {
// line 22 "ClassTemplateTest_CodeInjectionsNoBraces.ump"
System.out.println("Returning from foo!");
// END OF UMPLE AFTER INJECTION
return a;
}
// line 22 "ClassTemplateTest_CodeInjectionsNoBraces.ump"
System.out.println("Returning from foo!");
// END OF UMPLE AFTER INJECTION
return 4;
}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class Foo
{
//------------------------
// MEMBER VARIABLES
//------------------------
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct()
{}
//------------------------
// INTERFACE
//------------------------
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
/**
* I am a method comment.
*
* Notice how there are 4 empty lines below me.
*
*
*
*
* And 2 below me.
*
*
* These lines should come out as we see here.
* Comments such as these are often used to improve readability through whitespace clarity.
*/
public function testMethod()
{
// I am a test method.
}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class Mentor
{
//------------------------
// MEMBER VARIABLES
//------------------------
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct()
{}
//------------------------
// INTERFACE
//------------------------
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class Student
{
//------------------------
// MEMBER VARIABLES
//------------------------
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct()
{}
//------------------------
// INTERFACE
//------------------------
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
public function foo(int $a)
{
// line 16 "ClassTemplateTest_CodeInjectionsSingleLine.ump"
System.out.println("Starting foo with argument: " + a);
// END OF UMPLE BEFORE INJECTION
if(a < 0) {
// line 20 "ClassTemplateTest_CodeInjectionsSingleLine.ump"
System.out.println("Returning from foo!");
// END OF UMPLE AFTER INJECTION
return 0;
}
else if(a == 1) {
// line 20 "ClassTemplateTest_CodeInjectionsSingleLine.ump"
System.out.println("Returning from foo!");
// END OF UMPLE AFTER INJECTION
return -1;
}
else {
// line 20 "ClassTemplateTest_CodeInjectionsSingleLine.ump"
System.out.println("Returning from foo!");
// END OF UMPLE AFTER INJECTION
return 4;
}
for(int i = 0; i < a; i++) {
// TODO: call foo()
if(i == a/4) {
// line 20 "ClassTemplateTest_CodeInjectionsSingleLine.ump"
System.out.println("Returning from foo!");
// END OF UMPLE AFTER INJECTION
return a;
}
}
// line 20 "ClassTemplateTest_CodeInjectionsSingleLine.ump"
System.out.println("Returning from foo!");
// END OF UMPLE AFTER INJECTION
return 4;
}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
/*
This is a student
Multiple comments
on several lines
*/
class Student
{
//------------------------
// MEMBER VARIABLES
//------------------------
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct()
{}
//------------------------
// INTERFACE
//------------------------
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class Foo
{
//------------------------
// MEMBER VARIABLES
//------------------------
//Foo Associations
/**
* I am a inline comment above an association.
*/
private $bars;
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct()
{
$this->bars = array();
}
//------------------------
// INTERFACE
//------------------------
public function getBar_index($index)
{
$aBar = $this->bars[$index];
return $aBar;
}
public function getBars()
{
$newBars = $this->bars;
return $newBars;
}
public function numberOfBars()
{
$number = count($this->bars);
return $number;
}
public function hasBars()
{
$has = $this->numberOfBars() > 0;
return $has;
}
public function indexOfBar($aBar)
{
$wasFound = false;
$index = 0;
foreach($this->bars as $bar)
{
if ($bar->equals($aBar))
{
$wasFound = true;
break;
}
$index += 1;
}
$index = $wasFound ? $index : -1;
return $index;
}
public static function minimumNumberOfBars()
{
return 0;
}
public function addBarVia()
{
return new Bar($this);
}
public function addBar($aBar)
{
$wasAdded = false;
if ($this->indexOfBar($aBar) !== -1) { return false; }
$existingFoo = $aBar->getFoo();
$isNewFoo = $existingFoo != null && $this !== $existingFoo;
if ($isNewFoo)
{
$aBar->setFoo($this);
}
else
{
$this->bars[] = $aBar;
}
$wasAdded = true;
return $wasAdded;
}
public function removeBar($aBar)
{
$wasRemoved = false;
//Unable to remove aBar, as it must always have a foo
if ($this !== $aBar->getFoo())
{
unset($this->bars[$this->indexOfBar($aBar)]);
$this->bars = array_values($this->bars);
$wasRemoved = true;
}
return $wasRemoved;
}
public function addBarAt($aBar, $index)
{
$wasAdded = false;
if($this->addBar($aBar))
{
if($index < 0 ) { $index = 0; }
if($index > $this->numberOfBars()) { $index = $this->numberOfBars() - 1; }
array_splice($this->bars, $this->indexOfBar($aBar), 1);
array_splice($this->bars, $index, 0, array($aBar));
$wasAdded = true;
}
return $wasAdded;
}
public function addOrMoveBarAt($aBar, $index)
{
$wasAdded = false;
if($this->indexOfBar($aBar) !== -1)
{
if($index < 0 ) { $index = 0; }
if($index > $this->numberOfBars()) { $index = $this->numberOfBars() - 1; }
array_splice($this->bars, $this->indexOfBar($aBar), 1);
array_splice($this->bars, $index, 0, array($aBar));
$wasAdded = true;
}
else
{
$wasAdded = $this->addBarAt($aBar, $index);
}
return $wasAdded;
}
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{
foreach ($this->bars as $aBar)
{
$aBar->delete();
}
}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
// This is a student
class Student
{
//------------------------
// MEMBER VARIABLES
//------------------------
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct()
{}
//------------------------
// INTERFACE
//------------------------
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class Foo
{
//------------------------
// MEMBER VARIABLES
//------------------------
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct()
{}
//------------------------
// INTERFACE
//------------------------
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
/**
* Inline comment above method.
*/
public function testMethod1()
{
// I am a comment inside a method.
}
/**
* Multiple inline comments
* above method.
*/
public function testMethod2()
{
// I am a comment inside a method.
}
/**
* Multiline comment above method.
*/
public function testMethod3()
{
// I am a comment inside a method.
}
/**
* Multiple multiline comments
* above method.
*/
public function testMethod4()
{
// I am a comment inside a method.
}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class Foo
{
//------------------------
// MEMBER VARIABLES
//------------------------
//Foo Associations
/**
* Inline comment above association.
*/
private $bar1s;
/**
* Multiple inline comments
* above association.
*/
private $bar2s;
/**
* Multiline comment above association.
*/
private $bar3s;
/**
* Multiple multiline comments
* above association.
*/
private $bar4s;
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct()
{
$this->bar1s = array();
$this->bar2s = array();
$this->bar3s = array();
$this->bar4s = array();
}
//------------------------
// INTERFACE
//------------------------
public function getBar1_index($index)
{
$aBar1 = $this->bar1s[$index];
return $aBar1;
}
public function getBar1s()
{
$newBar1s = $this->bar1s;
return $newBar1s;
}
public function numberOfBar1s()
{
$number = count($this->bar1s);
return $number;
}
public function hasBar1s()
{
$has = $this->numberOfBar1s() > 0;
return $has;
}
public function indexOfBar1($aBar1)
{
$wasFound = false;
$index = 0;
foreach($this->bar1s as $bar1)
{
if ($bar1->equals($aBar1))
{
$wasFound = true;
break;
}
$index += 1;
}
$index = $wasFound ? $index : -1;
return $index;
}
public function getBar2_index($index)
{
$aBar2 = $this->bar2s[$index];
return $aBar2;
}
public function getBar2s()
{
$newBar2s = $this->bar2s;
return $newBar2s;
}
public function numberOfBar2s()
{
$number = count($this->bar2s);
return $number;
}
public function hasBar2s()
{
$has = $this->numberOfBar2s() > 0;
return $has;
}
public function indexOfBar2($aBar2)
{
$wasFound = false;
$index = 0;
foreach($this->bar2s as $bar2)
{
if ($bar2->equals($aBar2))
{
$wasFound = true;
break;
}
$index += 1;
}
$index = $wasFound ? $index : -1;
return $index;
}
public function getBar3_index($index)
{
$aBar3 = $this->bar3s[$index];
return $aBar3;
}
public function getBar3s()
{
$newBar3s = $this->bar3s;
return $newBar3s;
}
public function numberOfBar3s()
{
$number = count($this->bar3s);
return $number;
}
public function hasBar3s()
{
$has = $this->numberOfBar3s() > 0;
return $has;
}
public function indexOfBar3($aBar3)
{
$wasFound = false;
$index = 0;
foreach($this->bar3s as $bar3)
{
if ($bar3->equals($aBar3))
{
$wasFound = true;
break;
}
$index += 1;
}
$index = $wasFound ? $index : -1;
return $index;
}
public function getBar4_index($index)
{
$aBar4 = $this->bar4s[$index];
return $aBar4;
}
public function getBar4s()
{
$newBar4s = $this->bar4s;
return $newBar4s;
}
public function numberOfBar4s()
{
$number = count($this->bar4s);
return $number;
}
public function hasBar4s()
{
$has = $this->numberOfBar4s() > 0;
return $has;
}
public function indexOfBar4($aBar4)
{
$wasFound = false;
$index = 0;
foreach($this->bar4s as $bar4)
{
if ($bar4->equals($aBar4))
{
$wasFound = true;
break;
}
$index += 1;
}
$index = $wasFound ? $index : -1;
return $index;
}
public static function minimumNumberOfBar1s()
{
return 0;
}
public function addBar1Via()
{
return new Bar1($this);
}
public function addBar1($aBar1)
{
$wasAdded = false;
if ($this->indexOfBar1($aBar1) !== -1) { return false; }
$existingFoo = $aBar1->getFoo();
$isNewFoo = $existingFoo != null && $this !== $existingFoo;
if ($isNewFoo)
{
$aBar1->setFoo($this);
}
else
{
$this->bar1s[] = $aBar1;
}
$wasAdded = true;
return $wasAdded;
}
public function removeBar1($aBar1)
{
$wasRemoved = false;
//Unable to remove aBar1, as it must always have a foo
if ($this !== $aBar1->getFoo())
{
unset($this->bar1s[$this->indexOfBar1($aBar1)]);
$this->bar1s = array_values($this->bar1s);
$wasRemoved = true;
}
return $wasRemoved;
}
public function addBar1At($aBar1, $index)
{
$wasAdded = false;
if($this->addBar1($aBar1))
{
if($index < 0 ) { $index = 0; }
if($index > $this->numberOfBar1s()) { $index = $this->numberOfBar1s() - 1; }
array_splice($this->bar1s, $this->indexOfBar1($aBar1), 1);
array_splice($this->bar1s, $index, 0, array($aBar1));
$wasAdded = true;
}
return $wasAdded;
}
public function addOrMoveBar1At($aBar1, $index)
{
$wasAdded = false;
if($this->indexOfBar1($aBar1) !== -1)
{
if($index < 0 ) { $index = 0; }
if($index > $this->numberOfBar1s()) { $index = $this->numberOfBar1s() - 1; }
array_splice($this->bar1s, $this->indexOfBar1($aBar1), 1);
array_splice($this->bar1s, $index, 0, array($aBar1));
$wasAdded = true;
}
else
{
$wasAdded = $this->addBar1At($aBar1, $index);
}
return $wasAdded;
}
public static function minimumNumberOfBar2s()
{
return 0;
}
public function addBar2Via()
{
return new Bar2($this);
}
public function addBar2($aBar2)
{
$wasAdded = false;
if ($this->indexOfBar2($aBar2) !== -1) { return false; }
$existingFoo = $aBar2->getFoo();
$isNewFoo = $existingFoo != null && $this !== $existingFoo;
if ($isNewFoo)
{
$aBar2->setFoo($this);
}
else
{
$this->bar2s[] = $aBar2;
}
$wasAdded = true;
return $wasAdded;
}
public function removeBar2($aBar2)
{
$wasRemoved = false;
//Unable to remove aBar2, as it must always have a foo
if ($this !== $aBar2->getFoo())
{
unset($this->bar2s[$this->indexOfBar2($aBar2)]);
$this->bar2s = array_values($this->bar2s);
$wasRemoved = true;
}
return $wasRemoved;
}
public function addBar2At($aBar2, $index)
{
$wasAdded = false;
if($this->addBar2($aBar2))
{
if($index < 0 ) { $index = 0; }
if($index > $this->numberOfBar2s()) { $index = $this->numberOfBar2s() - 1; }
array_splice($this->bar2s, $this->indexOfBar2($aBar2), 1);
array_splice($this->bar2s, $index, 0, array($aBar2));
$wasAdded = true;
}
return $wasAdded;
}
public function addOrMoveBar2At($aBar2, $index)
{
$wasAdded = false;
if($this->indexOfBar2($aBar2) !== -1)
{
if($index < 0 ) { $index = 0; }
if($index > $this->numberOfBar2s()) { $index = $this->numberOfBar2s() - 1; }
array_splice($this->bar2s, $this->indexOfBar2($aBar2), 1);
array_splice($this->bar2s, $index, 0, array($aBar2));
$wasAdded = true;
}
else
{
$wasAdded = $this->addBar2At($aBar2, $index);
}
return $wasAdded;
}
public static function minimumNumberOfBar3s()
{
return 0;
}
public function addBar3Via()
{
return new Bar3($this);
}
public function addBar3($aBar3)
{
$wasAdded = false;
if ($this->indexOfBar3($aBar3) !== -1) { return false; }
$existingFoo = $aBar3->getFoo();
$isNewFoo = $existingFoo != null && $this !== $existingFoo;
if ($isNewFoo)
{
$aBar3->setFoo($this);
}
else
{
$this->bar3s[] = $aBar3;
}
$wasAdded = true;
return $wasAdded;
}
public function removeBar3($aBar3)
{
$wasRemoved = false;
//Unable to remove aBar3, as it must always have a foo
if ($this !== $aBar3->getFoo())
{
unset($this->bar3s[$this->indexOfBar3($aBar3)]);
$this->bar3s = array_values($this->bar3s);
$wasRemoved = true;
}
return $wasRemoved;
}
public function addBar3At($aBar3, $index)
{
$wasAdded = false;
if($this->addBar3($aBar3))
{
if($index < 0 ) { $index = 0; }
if($index > $this->numberOfBar3s()) { $index = $this->numberOfBar3s() - 1; }
array_splice($this->bar3s, $this->indexOfBar3($aBar3), 1);
array_splice($this->bar3s, $index, 0, array($aBar3));
$wasAdded = true;
}
return $wasAdded;
}
public function addOrMoveBar3At($aBar3, $index)
{
$wasAdded = false;
if($this->indexOfBar3($aBar3) !== -1)
{
if($index < 0 ) { $index = 0; }
if($index > $this->numberOfBar3s()) { $index = $this->numberOfBar3s() - 1; }
array_splice($this->bar3s, $this->indexOfBar3($aBar3), 1);
array_splice($this->bar3s, $index, 0, array($aBar3));
$wasAdded = true;
}
else
{
$wasAdded = $this->addBar3At($aBar3, $index);
}
return $wasAdded;
}
public static function minimumNumberOfBar4s()
{
return 0;
}
public function addBar4Via()
{
return new Bar4($this);
}
public function addBar4($aBar4)
{
$wasAdded = false;
if ($this->indexOfBar4($aBar4) !== -1) { return false; }
$existingFoo = $aBar4->getFoo();
$isNewFoo = $existingFoo != null && $this !== $existingFoo;
if ($isNewFoo)
{
$aBar4->setFoo($this);
}
else
{
$this->bar4s[] = $aBar4;
}
$wasAdded = true;
return $wasAdded;
}
public function removeBar4($aBar4)
{
$wasRemoved = false;
//Unable to remove aBar4, as it must always have a foo
if ($this !== $aBar4->getFoo())
{
unset($this->bar4s[$this->indexOfBar4($aBar4)]);
$this->bar4s = array_values($this->bar4s);
$wasRemoved = true;
}
return $wasRemoved;
}
public function addBar4At($aBar4, $index)
{
$wasAdded = false;
if($this->addBar4($aBar4))
{
if($index < 0 ) { $index = 0; }
if($index > $this->numberOfBar4s()) { $index = $this->numberOfBar4s() - 1; }
array_splice($this->bar4s, $this->indexOfBar4($aBar4), 1);
array_splice($this->bar4s, $index, 0, array($aBar4));
$wasAdded = true;
}
return $wasAdded;
}
public function addOrMoveBar4At($aBar4, $index)
{
$wasAdded = false;
if($this->indexOfBar4($aBar4) !== -1)
{
if($index < 0 ) { $index = 0; }
if($index > $this->numberOfBar4s()) { $index = $this->numberOfBar4s() - 1; }
array_splice($this->bar4s, $this->indexOfBar4($aBar4), 1);
array_splice($this->bar4s, $index, 0, array($aBar4));
$wasAdded = true;
}
else
{
$wasAdded = $this->addBar4At($aBar4, $index);
}
return $wasAdded;
}
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{
foreach ($this->bar1s as $aBar1)
{
$aBar1->delete();
}
foreach ($this->bar2s as $aBar2)
{
$aBar2->delete();
}
foreach ($this->bar3s as $aBar3)
{
$aBar3->delete();
}
foreach ($this->bar4s as $aBar4)
{
$aBar4->delete();
}
}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class Foo
{
//------------------------
// MEMBER VARIABLES
//------------------------
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct()
{}
//------------------------
// INTERFACE
//------------------------
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
/**
* I am a comment above a method.
*/
public function testMethod()
{
// I am a comment inside a method.
}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class Foo
{
//------------------------
// MEMBER VARIABLES
//------------------------
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct()
{}
//------------------------
// INTERFACE
//------------------------
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
/**
* I am a comment above a method.
*/
public function testMethod()
{
// I am a comment inside a method.
}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class Foo
{
//------------------------
// MEMBER VARIABLES
//------------------------
//Foo Attributes
/**
* I am a inline comment above an attribute.
*/
private $bar;
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct($aBar)
{
$this->bar = $aBar;
}
//------------------------
// INTERFACE
//------------------------
public function setBar($aBar)
{
$wasSet = false;
$this->bar = $aBar;
$wasSet = true;
return $wasSet;
}
public function getBar()
{
return $this->bar;
}
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
}
?>
<?php
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!*/
class Mentor
{
//------------------------
// MEMBER VARIABLES
//------------------------
//------------------------
// CONSTRUCTOR
//------------------------
public function __construct()
{}
//------------------------
// INTERFACE
//------------------------
public function equals($compareTo)
{
return $this == $compareTo;
}
public function delete()
{}
}
?>