Skip to content

Instantly share code, notes, and snippets.

@piiskop
Last active March 15, 2018 09:18
Show Gist options
  • Save piiskop/e727ef255fefcf8f0c166a41d9b0d75a to your computer and use it in GitHub Desktop.
Save piiskop/e727ef255fefcf8f0c166a41d9b0d75a to your computer and use it in GitHub Desktop.
<?php
namespace pupils;
class StudyGroup {
private $id;
private $name;
/**
*
* @return mixed
*/
public function getId() {
return $this->id;
}
/**
*
* @param mixed $id
*/
public function setId($id) {
$this->id = $id;
}
/**
*
* @return mixed
*/
public function getName() {
return $this->name;
}
/**
*
* @param mixed $name
*/
public function setName($name) {
$this->name = $name;
}
public function __construct($arguments) {
if (isset($arguments['id'])) {
$this->setId($arguments['id']);
}
if (isset($arguments['name'])) {
$this->setName($arguments['name']);
}
}
public static function findAll() {
$dummyStudyGroups = array (
array (
'id' => 1,
'name' => 'JPTVE15'
),
array (
'id' => 2,
'name' => 'WeMama'
),
array (
'id' => 3,
'name' => 'AlikeTramJam'
)
);
$dummyStudyGroups = array ();
return $dummyStudyGroups;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment