\D3strukt0r\VotifierClient\VoteType

ClassicVote

class D3strukt0r\VotifierClient\VoteType\ClassicVote

The classic vote package can be used by most plugins.

private property $serviceName

string — The name of the list/service

private property $username

string — The username who wants to receive the rewards

private property $address

string — The IP Address of the user

private property $timestamp

\DateTime|null — The time when the vote will be sent

public __construct($username, $serviceName, $address[, $timestamp = null])

Creates the ClassicVote object.

Parameters:
  • $username (string) – (Required) The username who wants to receive the rewards
  • $serviceName (string) – (Required) The name of the list/service
  • $address (string) – (Required) The IP Address of the user
  • $timestamp (\DateTime|null) – (Optional) The time when the vote will be sent
public getServiceName() → string

The name of the list/service.

Returns:string — Returns the name of the list/service
public getUsername() → string

The username who wants to receive the rewards.

Returns:string — Returns the username who wants to receive the rewards
public getAddress() → string

The IP Address of the user.

Returns:string — Returns the IP Address of the user
public getTimestamp() → int|null

Get the time when the vote was sent.

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

Set 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:

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