Documentation

WeeklyPhoto
in package
implements ResourceInterface uses IdentifiableTrait

Maintains a list of the "Foto of the week".

Attributes
#[Entity]

Table of Contents

Interfaces

ResourceInterface

Properties

$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
The photo of the week.
$week  : DateTime
The start date of the week the photo is based on.

Methods

getId()  : int|null
Get the identifier of the object.
getPhoto()  : Photo
getResourceId()  : string
Get the resource ID.
getWeek()  : DateTime
setId()  : void
Setting the identifier manually will, in most instances, result in undefined behaviour. Use with caution!
setPhoto()  : void
setWeek()  : void

Properties

$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

The photo of the week.

protected Photo $photo
Attributes
#[JoinColumn]
$name: 'photo_id'
$referencedColumnName: 'id'
$nullable: false
#[OneToOne]
$targetEntity: \Photo\Model\Photo::class
$inversedBy: 'weeklyPhoto'

$week

The start date of the week the photo is based on.

protected DateTime $week
Attributes
#[Column]
$type: 'date'

Methods

getId()

Get the identifier of the object.

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

getResourceId()

Get the resource ID.

public getResourceId() : string
Return values
string

getWeek()

public getWeek() : DateTime
Return values
DateTime

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

setWeek()

public setWeek(DateTime $week) : void
Parameters
$week : DateTime

        
On this page

Search results