Vote
in package
uses
IdentifiableTrait
Vote, represents a vote for a photo of the week.
Tags
Attributes
- #[Entity]
Table of Contents
Properties
- $dateTime : DateTime
- Date and time when the photo was voted for.
- $id : int|null
- The default value must be `null` to prevent issues with auto generating the value. The column is strictly not nullable.
- $photo : Photo
- $voter : Member
Methods
- __construct() : mixed
- getDateTime() : DateTime
- getId() : int|null
- Get the identifier of the object.
- getPhoto() : Photo
- setId() : void
- Setting the identifier manually will, in most instances, result in undefined behaviour. Use with caution!
- setPhoto() : void
- toGdprArray() : VoteGdprArrayType
Properties
$dateTime
Date and time when the photo was voted for.
protected
DateTime
$dateTime
Attributes
- #[Column]
- $type: 'datetime'
$id
The default value must be `null` to prevent issues with auto generating the value. The column is strictly not nullable.
protected
int|null
$id
= null
Attributes
- #[Column]
- $type: 'integer'
- #[GeneratedValue]
- $strategy: 'IDENTITY'
- #[Id]
$photo
protected
Photo
$photo
Attributes
- #[JoinColumn]
- $name: 'photo_id'
- $referencedColumnName: 'id'
- $nullable: false
- #[ManyToOne]
- $targetEntity: Photo::class
- $inversedBy: 'votes'
$voter
protected
Member
$voter
Attributes
- #[JoinColumn]
- $name: 'voter_id'
- $referencedColumnName: 'lidnr'
- $nullable: false
- #[ManyToOne]
- $targetEntity: MemberModel::class
Methods
__construct()
public
__construct(Photo $photo, Member $voter) : mixed
Parameters
getDateTime()
public
getDateTime() : DateTime
Return values
DateTimegetId()
Get the identifier of the object.
public
getId() : int|null
Tags
Return values
int|nullgetPhoto()
public
getPhoto() : Photo
Return values
PhotosetId()
Setting the identifier manually will, in most instances, result in undefined behaviour. Use with caution!
public
setId(int|null $id) : void
Parameters
- $id : int|null
setPhoto()
public
setPhoto(Photo $photo) : void
Parameters
- $photo : Photo
toGdprArray()
public
toGdprArray() : VoteGdprArrayType