- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
<?PHP
class MVC {
public function Model ($text) {
$text = '<i>' . $text . '</i>';
return $text;
}
public function View ($text) {
$text = $Child::MakeTextBold($text);
echo $text;
}
public function Controller () {
$text = 'Some text';
$new_text = self::Model($text);
self::View($new_text);
}
}
class NewClass extends MVC {
public function MakeTextBold ($text) {
$text = '<strong>' . $text . '</strong>';
return $text;
}
}
?>