hi jonas-e,
$title is a so called member property of your Doc class, which means you need to access them inside your class via this: $this->title
In your setter method it should therefore be:
PHP Code:
public function setTitle($t) {
$this->title=$t;
// return; no return here, setters should return nothing usually
}
Accordingly it should be $this->title in your docstart() method.
Because you made the title property public, you can access it outside of your class by using your class instance: $myDoc->title, but for best practice member properties should not be public.
Which means you should set private $title ="..." in your class and access it from outside through a getter method:
PHP Code:
public function getTitle(){
return $this->title;
}
Bookmarks