Documentation

Photo
in package
implements ResourceInterface uses IdentifiableTrait

Photo.

Tags
psalm-import-type

AlbumArrayType from Album as ImportedAlbumArrayType

psalm-type

PhotoArrayType = array{ id: int, dateTime: DateTime, artist: ?string, camera: ?string, flash: ?bool, focalLength: ?float, exposureTime: ?float, shutterSpeed: ?string, aperture: ?string, iso: ?int, album: ImportedAlbumArrayType, path: string, longitude: ?float, latitude: ?float, }

psalm-type

PhotoGdprArrayType = array{ id: int, dateTime: string, path: string, }

Attributes
#[Entity]
#[HasLifecycleCallbacks]

Table of Contents

Interfaces

ResourceInterface

Properties

$album  : Album
Album in which the photo is.
$aperture  : string|null
The lens aperture.
$artist  : string|null
Artist/author.
$aspectRatio  : float|null
The aspect ratio of the photo width/height.
$camera  : string|null
The type of camera used.
$dateTime  : DateTime
Date and time when the photo was taken.
$exposureTime  : float|null
The exposure time, in seconds.
$flash  : bool|null
Whether a flash has been used.
$focalLength  : float|null
The focal length of the lens, in mm.
$id  : int|null
The default value must be `null` to prevent issues with auto generating the value. The column is strictly not nullable.
$iso  : int|null
Indicates the ISO Speed and ISO Latitude of the camera.
$latitude  : float|null
The GPS latitude of the location where the photo was taken.
$longitude  : float|null
The GPS longitude of the location where the photo was taken.
$path  : string
The path where the photo is located relative to the storage directory.
$profilePhotos  : Collection<string|int, ProfilePhoto>
All the profile photos that use this photo.
$shutterSpeed  : string|null
The shutter speed.
$tags  : Collection<string|int, Tag>
All the tags for this photo.
$votes  : Collection<string|int, Vote>
All the votes for this photo.
$weeklyPhoto  : WeeklyPhoto|null
The corresponding WeeklyPhoto entity if this photo has been a weekly photo.

Methods

__construct()  : mixed
addProfilePhoto()  : void
addProfilePhotos()  : void
addTag()  : void
Add a tag to a photo.
addVote()  : void
Add a vote for this photo.
calculateAspectRatio()  : void
getAlbum()  : Album
Get the album.
getAperture()  : string|null
Get the aperture.
getArtist()  : string|null
Get the artist.
getAspectRatio()  : float|null
getCamera()  : string|null
Get the camera.
getDateTime()  : DateTime
Get the date.
getExposureTime()  : float|null
Get the exposure time.
getFlash()  : bool|null
Get the flash.
getFocalLength()  : float|null
Get the focal length.
getId()  : int|null
Get the identifier of the object.
getIso()  : int|null
Get the ISO.
getLatitude()  : float|null
Get the GPS latitude of the location where the photo was taken.
getLongitude()  : float|null
Get the GPS longitude of the location where the photo was taken.
getPath()  : string
Get the path where the photo is stored.
getProfilePhotos()  : Collection<string|int, ProfilePhoto>
getResourceId()  : string
Get the resource ID.
getShutterSpeed()  : string|null
Get the shutter speed.
getTagCount()  : int
getTags()  : Collection<string|int, Tag>
getVoteCount()  : int
getWeeklyPhoto()  : WeeklyPhoto|null
removeProfilePhoto()  : void
removeProfilePhotos()  : void
setAlbum()  : void
Set the album.
setAperture()  : void
Set the aperture.
setArtist()  : void
Set the artist.
setAspectRatio()  : void
Sets the aspect ratio.
setCamera()  : void
Set the camera.
setDateTime()  : void
Set the dateTime.
setExposureTime()  : void
Set the exposure time.
setFlash()  : void
Set the flash.
setFocalLength()  : void
Set the focal length.
setId()  : void
Setting the identifier manually will, in most instances, result in undefined behaviour. Use with caution!
setIso()  : void
Set the ISO.
setLatitude()  : void
Set the GPS latitude of the location where the photo was taken.
setLongitude()  : void
Set the GPS longitude of the location where the photo was taken.
setPath()  : void
Set the path where the photo is stored.
setShutterSpeed()  : void
Set the shutter speed.
toArray()  : PhotoArrayType
Returns an associative array representation of this object.
toGdprArray()  : PhotoGdprArrayType

Properties

$album

Album in which the photo is.

protected Album $album
Attributes
#[JoinColumn]
$name: 'album_id'
$referencedColumnName: 'id'
$nullable: false
#[ManyToOne]
$targetEntity: \Photo\Model\Album::class
$inversedBy: 'photos'

$aperture

The lens aperture.

protected string|null $aperture = null
Attributes
#[Column]
$type: 'string'
$nullable: true

$artist

Artist/author.

protected string|null $artist = null
Attributes
#[Column]
$type: 'string'
$nullable: true

$aspectRatio

The aspect ratio of the photo width/height.

protected float|null $aspectRatio = null
Attributes
#[Column]
$type: 'float'
$nullable: true

$camera

The type of camera used.

protected string|null $camera = null
Attributes
#[Column]
$type: 'string'
$nullable: true

$dateTime

Date and time when the photo was taken.

protected DateTime $dateTime
Attributes
#[Column]
$type: 'datetime'

$exposureTime

The exposure time, in seconds.

protected float|null $exposureTime = null
Attributes
#[Column]
$type: 'float'
$nullable: true

$flash

Whether a flash has been used.

protected bool|null $flash = null
Attributes
#[Column]
$type: 'boolean'
$nullable: true

$focalLength

The focal length of the lens, in mm.

protected float|null $focalLength = null
Attributes
#[Column]
$type: 'float'
$nullable: true

$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]

$iso

Indicates the ISO Speed and ISO Latitude of the camera.

protected int|null $iso = null
Attributes
#[Column]
$type: 'smallint'
$nullable: true

$latitude

The GPS latitude of the location where the photo was taken.

protected float|null $latitude = null
Attributes
#[Column]
$type: 'float'
$nullable: true

$longitude

The GPS longitude of the location where the photo was taken.

protected float|null $longitude = null
Attributes
#[Column]
$type: 'float'
$nullable: true

$path

The path where the photo is located relative to the storage directory.

protected string $path
Attributes
#[Column]
$type: 'string'

$profilePhotos

All the profile photos that use this photo.

protected Collection<string|int, ProfilePhoto> $profilePhotos
Attributes
#[OneToMany]
$targetEntity: \Photo\Model\ProfilePhoto::class
$mappedBy: 'photo'
$cascade: ['persist', 'remove']
$fetch: 'EXTRA_LAZY'

$shutterSpeed

The shutter speed.

protected string|null $shutterSpeed = null
Attributes
#[Column]
$type: 'string'
$nullable: true

$tags

All the tags for this photo.

protected Collection<string|int, Tag> $tags
Attributes
#[OneToMany]
$targetEntity: \Photo\Model\Tag::class
$mappedBy: 'photo'
$cascade: ['persist', 'remove']

$votes

All the votes for this photo.

protected Collection<string|int, Vote> $votes
Attributes
#[OneToMany]
$targetEntity: \Photo\Model\Vote::class
$mappedBy: 'photo'
$cascade: ['persist', 'remove']

$weeklyPhoto

The corresponding WeeklyPhoto entity if this photo has been a weekly photo.

protected WeeklyPhoto|null $weeklyPhoto = null
Attributes
#[OneToOne]
$targetEntity: \Photo\Model\WeeklyPhoto::class
$mappedBy: 'photo'
$cascade: ['persist', 'remove']

Methods

__construct()

public __construct() : mixed

addProfilePhotos()

public addProfilePhotos(array<string|int, ProfilePhoto$profilePhotos) : void
Parameters
$profilePhotos : array<string|int, ProfilePhoto>

addTag()

Add a tag to a photo.

public addTag(Tag $tag) : void
Parameters
$tag : Tag

addVote()

Add a vote for this photo.

public addVote(Vote $vote) : void
Parameters
$vote : Vote

calculateAspectRatio()

public calculateAspectRatio() : void
Attributes
#[PrePersist]

getAperture()

Get the aperture.

public getAperture() : string|null
Return values
string|null

getArtist()

Get the artist.

public getArtist() : string|null
Return values
string|null

getAspectRatio()

public getAspectRatio() : float|null
Return values
float|null

getCamera()

Get the camera.

public getCamera() : string|null
Return values
string|null

getDateTime()

Get the date.

public getDateTime() : DateTime
Return values
DateTime

getExposureTime()

Get the exposure time.

public getExposureTime() : float|null
Return values
float|null

getFlash()

Get the flash.

public getFlash() : bool|null
Return values
bool|null

getFocalLength()

Get the focal length.

public getFocalLength() : float|null
Return values
float|null

getId()

Get the identifier of the object.

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

getIso()

Get the ISO.

public getIso() : int|null
Return values
int|null

getLatitude()

Get the GPS latitude of the location where the photo was taken.

public getLatitude() : float|null
Return values
float|null

getLongitude()

Get the GPS longitude of the location where the photo was taken.

public getLongitude() : float|null
Return values
float|null

getPath()

Get the path where the photo is stored.

public getPath() : string
Return values
string

getResourceId()

Get the resource ID.

public getResourceId() : string
Return values
string

getShutterSpeed()

Get the shutter speed.

public getShutterSpeed() : string|null
Return values
string|null

getTagCount()

public getTagCount() : int
Return values
int

getTags()

public getTags() : Collection<string|int, Tag>
Return values
Collection<string|int, Tag>

getVoteCount()

public getVoteCount() : int
Return values
int

removeProfilePhotos()

public removeProfilePhotos(array<string|int, ProfilePhoto$profilePhotos) : void
Parameters
$profilePhotos : array<string|int, ProfilePhoto>

setAlbum()

Set the album.

public setAlbum(Album $album) : void
Parameters
$album : Album

setAperture()

Set the aperture.

public setAperture(string|null $aperture) : void
Parameters
$aperture : string|null

setArtist()

Set the artist.

public setArtist(string|null $artist) : void
Parameters
$artist : string|null

setAspectRatio()

Sets the aspect ratio.

public setAspectRatio(float|null $ratio) : void
Parameters
$ratio : float|null

setCamera()

Set the camera.

public setCamera(string|null $camera) : void
Parameters
$camera : string|null

setDateTime()

Set the dateTime.

public setDateTime(DateTime $dateTime) : void
Parameters
$dateTime : DateTime

setExposureTime()

Set the exposure time.

public setExposureTime(float|null $exposureTime) : void
Parameters
$exposureTime : float|null

setFlash()

Set the flash.

public setFlash(bool|null $flash) : void
Parameters
$flash : bool|null

setFocalLength()

Set the focal length.

public setFocalLength(float|null $focalLength) : void
Parameters
$focalLength : float|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

setIso()

Set the ISO.

public setIso(int|null $iso) : void
Parameters
$iso : int|null

setLatitude()

Set the GPS latitude of the location where the photo was taken.

public setLatitude(float|null $latitude) : void
Parameters
$latitude : float|null

setLongitude()

Set the GPS longitude of the location where the photo was taken.

public setLongitude(float|null $longitude) : void
Parameters
$longitude : float|null

setPath()

Set the path where the photo is stored.

public setPath(string $path) : void
Parameters
$path : string

setShutterSpeed()

Set the shutter speed.

public setShutterSpeed(string|null $shutterSpeed) : void
Parameters
$shutterSpeed : string|null

toArray()

Returns an associative array representation of this object.

public toArray() : PhotoArrayType
Return values
PhotoArrayType

toGdprArray()

public toGdprArray() : PhotoGdprArrayType
Return values
PhotoGdprArrayType

        
On this page

Search results