Implements `__toString` magic method.