Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Prof {
- public function modifCours($name, $desc, $student, $time) {
- //Code de modif de cours
- }
- }
- class Modo {
- public function modifCours($name, $desc, $student, $time) {
- //On appel la méthode du prof pour modif les cours
- Prof::modifcours($name, $desc, $student, $time);
- }
- public function changeLvl(int $id_membre, int $level) {
- if (!$this->_checkLevel($level) {
- throw new Exception('Level ' . $level . ' isn't correct!');
- }
- //Code
- }
- private function _checkLevel($level) {
- if ($level < 2 || $level > 3)
- return false;
- return true;
- }
- }
- class Admin extends Modo {
- public function checkAccess($id_membre) {
- //Code
- }
- private function _checkLevel($level) {
- if ($level < 0 || $level > 3)
- return false;
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement