= 1) {
$this->title = array_shift($args);
$this->parts = $args;
}
}
function contains($part) {
return in_array($part, $this->parts);
}
function echoHTML($basepage) {
echo "
$this->title
";
echo "";
foreach($this->parts as $part) {
echo "- $part
";
}
echo "
";
}
}
// expects the elements of the $available array to be of type Bundle
function isValidAssignment($available, $assignment) {
foreach($available as $bundle) {
if($bundle->contains($assignment)) {
return true;
}
}
return false;
}
?>