Last active
March 15, 2018 09:18
-
-
Save piiskop/e727ef255fefcf8f0c166a41d9b0d75a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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