Beta version

class Font extends AbstractDateTimed

Fonts are entities which store each webfont file for a font-family and a font-variant.

Constants

REGULAR

ITALIC

BOLD

BOLD_ITALIC

LIGHT

LIGHT_ITALIC

MIME_DEFAULT

MIME_SVG

MIME_TTF

MIME_OTF

MIME_WOFF

MIME_WOFF2

MIME_EOT

Properties

static array $variantToHuman Get readable variant association

Methods

int
getId()

Get entity unique identifier.

setId(int $id)

No description

getCreatedAt()

No description

$this
setCreatedAt(DateTime $createdAt)

No description

getUpdatedAt()

No description

$this
setUpdatedAt(DateTime $updatedAt)

No description

preUpdate()

No description

prePersist()

No description

$this
resetDates()

Set creation and update date to now.

string
getReadableVariant()

Get a readable string to describe current font variant.

integer
getVariant()

No description

$this
setVariant(integer $variant)

No description

array
getFontVariantInfos()

Return font variant information for CSS font-face into a simple array.

string
getEOTFilename()

No description

$this
setEOTFilename(string $eotFilename)

No description

string
getWOFFFilename()

No description

$this
setWOFFFilename(string $woffFilename)

No description

string
getWOFF2Filename()

No description

$this
setWOFF2Filename(string $woff2Filename)

No description

string
getOTFFilename()

No description

$this
setOTFFilename(string $otfFilename)

No description

string
getSVGFilename()

No description

$this
setSVGFilename(string $svgFilename)

No description

string
getName()

No description

$this
setName(string $name)

No description

string
getHash()

No description

$this
setHash(string $hash)

No description

$this
generateHashWithSecret(string $secret)

No description

string
getFolder()

No description

string
getEOTRelativeUrl()

No description

string
getEOTAbsolutePath()

No description

string
getWOFFRelativeUrl()

No description

string
getWOFFAbsolutePath()

No description

string
getWOFF2RelativeUrl()

No description

string
getWOFF2AbsolutePath()

No description

string
getOTFRelativeUrl()

No description

string
getOTFAbsolutePath()

No description

string
getSVGRelativeUrl()

No description

string
getSVGAbsolutePath()

No description

string
getDescription()

No description

$this
setDescription(string $description)

No description

__construct()

Create a new Font and generate a random folder name.

static string
getFilesFolder()

No description

static string
getFilesFolderName()

No description

getHandler()

No description

UploadedFile
getEotFile()

Gets the value of eotFile.

setEotFile(UploadedFile $eotFile = null)

Sets the value of eotFile.

UploadedFile
getWoffFile()

Gets the value of woffFile.

setWoffFile(UploadedFile $woffFile = null)

Sets the value of woffFile.

UploadedFile
getWoff2File()

Gets the value of woff2File.

setWoff2File(UploadedFile $woff2File = null)

Sets the value of woff2File.

UploadedFile
getOtfFile()

Gets the value of otfFile.

setOtfFile(UploadedFile $otfFile = null)

Sets the value of otfFile.

UploadedFile
getSvgFile()

Gets the value of svgFile.

setSvgFile(UploadedFile $svgFile = null)

Sets the value of svgFile.

Details

in AbstractEntity at line 51
int getId()

Get entity unique identifier.

Return Value

int

in AbstractEntity at line 60
AbstractEntity setId(int $id)

Parameters

int $id

Return Value

AbstractEntity

in AbstractDateTimed at line 53
DateTime getCreatedAt()

Return Value

DateTime

in AbstractDateTimed at line 63
$this setCreatedAt(DateTime $createdAt)

Parameters

DateTime $createdAt

Return Value

$this

in AbstractDateTimed at line 78
DateTime getUpdatedAt()

Return Value

DateTime

in AbstractDateTimed at line 88
$this setUpdatedAt(DateTime $updatedAt)

Parameters

DateTime $updatedAt

Return Value

$this

in AbstractDateTimed at line 98
preUpdate()

in AbstractDateTimed at line 105
prePersist()

in AbstractDateTimed at line 115
$this resetDates()

Set creation and update date to now.

Return Value

$this

at line 82
string getReadableVariant()

Get a readable string to describe current font variant.

Return Value

string

at line 94
integer getVariant()

Return Value

integer

at line 103
$this setVariant(integer $variant)

Parameters

integer $variant

Return Value

$this

at line 119
array getFontVariantInfos()

Return font variant information for CSS font-face into a simple array.

  • style
  • weight

Return Value

array

at line 183
string getEOTFilename()

Return Value

string

at line 192
$this setEOTFilename(string $eotFilename)

Parameters

string $eotFilename

Return Value

$this

at line 206
string getWOFFFilename()

Return Value

string

at line 215
$this setWOFFFilename(string $woffFilename)

Parameters

string $woffFilename

Return Value

$this

at line 229
string getWOFF2Filename()

Return Value

string

at line 238
$this setWOFF2Filename(string $woff2Filename)

Parameters

string $woff2Filename

Return Value

$this

at line 252
string getOTFFilename()

Return Value

string

at line 261
$this setOTFFilename(string $otfFilename)

Parameters

string $otfFilename

Return Value

$this

at line 275
string getSVGFilename()

Return Value

string

at line 284
$this setSVGFilename(string $svgFilename)

Parameters

string $svgFilename

Return Value

$this

at line 298
string getName()

Return Value

string

at line 307
$this setName(string $name)

Parameters

string $name

Return Value

$this

at line 321
string getHash()

Return Value

string

at line 331
$this setHash(string $hash)

Parameters

string $hash

Return Value

$this

at line 343
$this generateHashWithSecret(string $secret)

Parameters

string $secret

Return Value

$this

at line 357
string getFolder()

Return Value

string

at line 365
string getEOTRelativeUrl()

Return Value

string

at line 373
string getEOTAbsolutePath()

Return Value

string

at line 380
string getWOFFRelativeUrl()

Return Value

string

at line 388
string getWOFFAbsolutePath()

Return Value

string

at line 395
string getWOFF2RelativeUrl()

Return Value

string

at line 403
string getWOFF2AbsolutePath()

Return Value

string

at line 410
string getOTFRelativeUrl()

Return Value

string

at line 418
string getOTFAbsolutePath()

Return Value

string

at line 425
string getSVGRelativeUrl()

Return Value

string

at line 433
string getSVGAbsolutePath()

Return Value

string

at line 445
string getDescription()

Return Value

string

at line 454
$this setDescription(string $description)

Parameters

string $description

Return Value

$this

at line 464
__construct()

Create a new Font and generate a random folder name.

at line 473
static string getFilesFolder()

Return Value

string Return absolute path to fonts folder. This path should be protected.

at line 481
static string getFilesFolderName()

Return Value

string

at line 489
FontHandler getHandler()

Return Value

FontHandler

at line 499
UploadedFile getEotFile()

Gets the value of eotFile.

Return Value

UploadedFile

at line 510
Font setEotFile(UploadedFile $eotFile = null)

Sets the value of eotFile.

Parameters

UploadedFile $eotFile the eot file

Return Value

Font

at line 522
UploadedFile getWoffFile()

Gets the value of woffFile.

Return Value

UploadedFile

at line 533
Font setWoffFile(UploadedFile $woffFile = null)

Sets the value of woffFile.

Parameters

UploadedFile $woffFile the woff file

Return Value

Font

at line 544
UploadedFile getWoff2File()

Gets the value of woff2File.

Return Value

UploadedFile

at line 555
Font setWoff2File(UploadedFile $woff2File = null)

Sets the value of woff2File.

Parameters

UploadedFile $woff2File the woff2 file

Return Value

Font

at line 566
UploadedFile getOtfFile()

Gets the value of otfFile.

Return Value

UploadedFile

at line 577
Font setOtfFile(UploadedFile $otfFile = null)

Sets the value of otfFile.

Parameters

UploadedFile $otfFile the otf file

Return Value

Font

at line 588
UploadedFile getSvgFile()

Gets the value of svgFile.

Return Value

UploadedFile

at line 599
Font setSvgFile(UploadedFile $svgFile = null)

Sets the value of svgFile.

Parameters

UploadedFile $svgFile the svg file

Return Value

Font