abstract class AbstractDocument extends AbstractDateTimed implements DocumentInterface (View source)

Class AbstractDocument

Properties

protected $id from AbstractEntity
protected DateTime $createdAt from AbstractDateTimed
protected DateTime $updatedAt from AbstractDateTimed
static protected array $mimeToIcon Associate mime type to simple types.

Methods

int
getId()

No description

setId(int $id)

No description

getCreatedAt()

No description

setCreatedAt(DateTime $createdAt)

No description

getUpdatedAt()

No description

setUpdatedAt(DateTime $updatedAt)

No description

preUpdate()

No description

prePersist()

No description

resetDates()

Set creation and update date to now.

string
getShortType()

Get short type name for current document Mime type.

string
getShortMimeType()

Get short Mime type.

boolean
isImage()

Is current document an image.

boolean
isSvg()

Is current document a vector SVG file.

boolean
isVideo()

Is current document a video.

boolean
isAudio()

Is current document an audio file.

bool
isPdf()

Is current document a PDF file.

string|null
getRelativeUrl() deprecated

No description

string|null
getRelativePath()

No description

boolean
isEmbed()

Tells if current document has embed media informations.

__construct()

AbstractDocument constructor.

Details

int getId()

Return Value

int

AbstractEntity setId(int $id)

Parameters

int $id

Return Value

AbstractEntity

DateTime getCreatedAt()

Return Value

DateTime

AbstractDateTimed setCreatedAt(DateTime $createdAt)

Parameters

DateTime $createdAt

Return Value

AbstractDateTimed

DateTime getUpdatedAt()

Return Value

DateTime

AbstractDateTimed setUpdatedAt(DateTime $updatedAt)

Parameters

DateTime $updatedAt

Return Value

AbstractDateTimed

preUpdate()

prePersist()

AbstractEntity resetDates()

Set creation and update date to now.

Return Value

AbstractEntity

string getShortType()

Get short type name for current document Mime type.

Return Value

string

string getShortMimeType()

Get short Mime type.

Return Value

string

boolean isImage()

Is current document an image.

Return Value

boolean

boolean isSvg()

Is current document a vector SVG file.

Return Value

boolean

boolean isVideo()

Is current document a video.

Return Value

boolean

boolean isAudio()

Is current document an audio file.

Return Value

boolean

bool isPdf()

Is current document a PDF file.

Return Value

bool

string|null getRelativeUrl() deprecated

deprecated Use getRelativePath instead, naming is better.

Return Value

string|null

string|null getRelativePath()

Return Value

string|null

boolean isEmbed()

Tells if current document has embed media informations.

Return Value

boolean

__construct()

AbstractDocument constructor.