In terms of constructors, due to the lack of accessors and mutators in PHP, I'm trying to emulate the same functionality by creating methods named setX() and getX() like so:

```
<?php

class Example {
  protected $message; // Nullable

  public function setMessage (Message $message = NULL) {
    $this->message = $message;
  }

  public function getMessage () {
    return $this->message;
  }
}

?>

```

I've read that setting properties by using the constructor should be identical to setting the properties using accessor and mutator methods.

But this leads to a problem in relation to constructors as I've read in a number of locations that you should not call overridable methods within a constructor because the invocation of an overridable method during object construction may result in the use of uninitialised data, leading to runtime exceptions or to unanticipated outcomes.

My question is, does the same rule apply, in that you should not call overloadable accessor and mutator methods, as shown the following example:

```
<?php

class Example {
  protected $message; // Nullable

  public function __construct (Message $message = NULL) {
    $this->setMessage($message);
  }

  public function setMessage (Message $message = NULL) {
    $this->message = $message;
  }

  public function getMessage () {
    return $this->message;
  }
}

?>

```

My sources for where I've read this information include:

* <http://msdn.microsoft.com/en-gb/library/vstudio/ms229060%28v=vs.100%29.aspx>
* <https://www.securecoding.cert.org/confluence/display/java/MET05-J.+Ensure+that+constructors+do+not+call+overridable+methods>