\Applications\EntityAttachment

An Attachment of an application

Provides some magic function for accessing properties as class members, mirroring these calls to the getter and setter methods.

Summary

Methods
Properties
Constants
getResourceId()
setUser()
getUser()
setName()
getName()
getPrettySize()
setType()
getType()
setDateUploaded()
getDateUploaded()
getFile()
setFile()
getLength()
getResource()
getContent()
setPermissions()
getPermissions()
getUri()
getId()
setId()
__set()
__get()
__isset()
No public properties found
No constants found
No protected methods found
$user
$name
$mimetype
$file
$uploadDate
$dateUploaded
$length
$chunkSize
$md5
$permissions
$id
N/A
No private methods found
No private properties found
N/A

Properties

$user

$user

owner of an attachment. Typically this is the candidate who applies for a joboffer.

$name

$name

Name of the attachment

$mimetype

$mimetype

mimetype of the attachment.

$file

$file

Binary data of the Attachment.

$uploadDate

$uploadDate

Used by MongoGridFS. We don't use this. We use $dateUploaded instead.

$dateUploaded

$dateUploaded

date of uploaded file

$length

$length

$chunkSize

$chunkSize

$md5

$md5

$id

$id : mixed

Entity id

Type

mixed

Methods

getResourceId()

getResourceId() : string

Returns

string

setUser()

setUser(\Auth\Entity\UserInterface $user) : $this

Sets the owner of a file

Parameters

\Auth\Entity\UserInterface $user

Returns

$this

getUser()

getUser() : \Auth\Entity\User

Gets the owner of a file

Returns

\Auth\Entity\User

setName()

setName(mixed $name) : $this

Sets the name of a file

Parameters

mixed $name

Returns

$this

getName()

getName() : mixed

Gets the name of a file

Returns

mixed

getPrettySize()

getPrettySize() : string

Gets the length of file in GB, MB ot kB format

Returns

string

setType()

setType(mixed $mime) : $this

Sets the mime-type of a file

Parameters

mixed $mime

Returns

$this

getType()

getType() : mixed

Gets the mime-type of a file

Returns

mixed

setDateUploaded()

setDateUploaded(\DateTime|null $date) : $this

Sets the uploaded date of a file

Parameters

\DateTime|null $date

Returns

$this

getDateUploaded()

getDateUploaded() : mixed

Gets the uploaded date of a file

Returns

mixed

getFile()

getFile() : mixed

Gets the file

Returns

mixed

setFile()

setFile(mixed $file) : $this

Sets the file

Parameters

mixed $file

Returns

$this

getLength()

getLength() : mixed

Gets the length of the file

Returns

mixed

getResource()

getResource() : null|\stream

Gets the resource of a file

Returns

null|\stream

getContent()

getContent() : null|string

Returns the binary data of a file

Returns

null|string

setPermissions()

setPermissions(\Core\Entity\PermissionsInterface $permissions) : $this

Sets Permissions of a file

Parameters

\Core\Entity\PermissionsInterface $permissions

Returns

$this

getUri()

getUri() : string

Gets the URI of an attachment

The returned URI is NOT prepended with the base path!

Returns

string

getId()

getId() : mixed

Gets the id.

Returns

mixed

setId()

setId( $id) : $this

Sets the id.

Parameters

$id

Returns

$this

__set()

__set(string $property, mixed $value) : mixed

Sets a property through the setter method.

An exception is raised, when no setter method exists.

Parameters

string $property
mixed $value

Throws

\Core\Entity\Exception\OutOfBoundsException

Returns

mixed

__get()

__get(string $property) : mixed

Gets a property through the getter method.

An exception is raised, when no getter method exists.

Parameters

string $property

Throws

\Core\Entity\Exception\OutOfBoundsException

Returns

mixed

__isset()

__isset(string $property) : boolean

Checks if a property exists and has a non-empty value.

If the property is an array, the check will return, if this array has items or not.

Parameters

string $property

Returns

boolean