Add __toString method to PeerAddress class

This commit is contained in:
netkas 2025-01-15 15:15:06 -05:00
parent 2fcdb7cd56
commit 8cad8f97fe

View file

@ -109,4 +109,14 @@
{ {
return sprintf("%s@%s", $this->username, $this->domain); return sprintf("%s@%s", $this->username, $this->domain);
} }
/**
* Returns the string representation of the object
*
* @return string The string representation of the object
*/
public function __toString(): string
{
return $this->getAddress();
}
} }