public function __toString() { $name = $this->getName(); $parent = parent::__toString(); return $name ?: $parent; }