\D3strukt0r\Votifier\Client\VoteType

VoteInterface

interface D3strukt0r\Votifier\Client\VoteType\VoteInterface

The interface VoteInterface will be used for different kinds of vote packages.

public getServiceName() → string|null

The name of the list/service.

Returns:string|null — Returns the name of the list/service
public setServiceName($serviceName)

Sets the name of the list/service.

Parameters:
  • $serviceName (string) – The name of the list/service
Returns:

$this — Returns the class itself, for doing multiple things at once

public getUsername() → string|null

Gets the username of the user who wants to receive the rewards.

Returns:string|null — Returns the username who wants to receive the rewards
public setUsername($username)

Sets the username of the user who wants to receive the rewards.

Parameters:
  • $username (string) – The username of the user who wants to receive the rewards
Returns:

$this — Returns the class itself, for doing multiple things at once

public getAddress() → string

Gets the IP Address of the user.

Returns:string — Returns the IP Address of the user
public setAddress($address)

Sets the IP Address of the user.

Parameters:
  • $address (string) – The IP address the user is sending a request from
Returns:

$this — Returns the class itself, for doing multiple things at once

public getTimestamp() → int|null

Gets the time when the vote was sent.

Returns:int|null — Returns the time when the vote was sent, null otherwise
public setTimestamp([$timestamp = null])

Sets the time when the vote will be sent.

Parameters:
  • $timestamp (DateTime|null) – [optional] Either give a wanted timestamp or it will use the current time
Returns:

$this — Returns the class itself, for doing multiple things at once