Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions prototype/bookprototype.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* abstract class BookPrototype
*/
abstract class BookPrototype {

protected $title;
protected $topic;
//make properties private not protected we have set and get method and any one can use it
private $title;
private $topic;

// this magic method is invoked each time a clone is called on the object variable
abstract function __clone();
Expand All @@ -21,5 +21,10 @@ function setTitle($titleIn) {
function getTopic() {
return $this->topic;
}

function setTopic($topicIn) {
$this->topic = $topicIn;
}

}
?>
?>