public function __toString() { $this->displayWarning(); if (isset($this->string)) { return $this->string; } else { return (string) $this->object; } }