\D3strukt0r\Votifier\Client\Vote

ClassicVote

class D3strukt0r\Votifier\Client\Vote\ClassicVote

The classic vote package can be used by most plugins.

protected property $serviceName

string — The name of the list/service

protected property $username

string — The username who wants to receive the rewards

protected property $address

string — The IP Address of the user

protected property $timestamp

DateTime — The time when the vote will be sent

public getServiceName() → string|null

The name of the list/service.

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

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) → $this

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) → $this

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]) → $this

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