Documentation

Vote
in package
uses IdentifiableTrait

Vote, represents a vote for a photo of the week.

Tags
psalm-import-type

PhotoGdprArrayType from Photo as ImportedPhotoGdprArrayType

psalm-type

VoteGdprArrayType = array{ id: int, dateTime: string, photo: ImportedPhotoGdprArrayType, }

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
$photo : Photo
$voter : Member

The member who voted

getDateTime()

public getDateTime() : DateTime
Return values
DateTime

getId()

Get the identifier of the object.

public getId() : int|null
Tags
psalm-ignore-nullable-return
Return values
int|null

setId()

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
Return values
VoteGdprArrayType

        
On this page

Search results