Add __toString method to PeerAddress class
This commit is contained in:
parent
2fcdb7cd56
commit
8cad8f97fe
1 changed files with 10 additions and 0 deletions
|
@ -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();
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue