forked from assembler-institute/oop-basics
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path18-ClassDogs2.php
More file actions
35 lines (27 loc) · 826 Bytes
/
18-ClassDogs2.php
File metadata and controls
35 lines (27 loc) · 826 Bytes
1
2
3
4
5
6
7
8
9
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
<?php
class Dogs2 extends Dogs {
public string $type = "";
public string $firstName = "";
public function __construct (string $name1, string $firstName, string $breed1, int $age1, string $type1) {
$this-> name = $name1;
$this -> firstName = $firstName;
$this -> breed = $breed1;
$this-> age = $age1;
$this -> type = $type1;
}
public function __destruct() {
echo "This properties get deleted: ".$this-> name;
}
public function getDogsData1() {
$data1 = "
<h2> Data Dogs 2 </h2>
Name : {$this->name}<br>
First Name : {$this->firstName}<br>
Breed : {$this ->breed}<br>
Age : {$this->age}<br>
Type : {$this->type}<br><br>
";
return $data1;
}
}
?>