Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 400 and 401]

(no description)

File Size: 209 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Size:: (12 methods):
  __construct()
  parse()
  getSizeUnits()
  setUnit()
  getUnit()
  setSize()
  getSize()
  isColorComponent()
  isSize()
  isRelative()
  __toString()
  render()


Class: Size  - X-Ref

__construct($fSize, $sUnit = null, $bIsColorComponent = false, $iLineNo = 0)   X-Ref

param: float|int|string $fSize
param: string|null $sUnit
param: bool $bIsColorComponent
param: int $iLineNo

parse(ParserState $oParserState, $bIsColorComponent = false)   X-Ref

param: bool $bIsColorComponent
return: Size

getSizeUnits()   X-Ref

return: array<int, array<string, string>>

setUnit($sUnit)   X-Ref

param: string $sUnit
return: void

getUnit()   X-Ref

return: string|null

setSize($fSize)   X-Ref

param: float|int|string $fSize

getSize()   X-Ref

return: float

isColorComponent()   X-Ref

return: bool

isSize()   X-Ref
Returns whether the number stored in this Size really represents a size (as in a length of something on screen).

return: false if the unit an angle, a duration, a frequency or the number is a component in a Color object.

isRelative()   X-Ref

return: bool

__toString()   X-Ref

return: string

render(OutputFormat $oOutputFormat)   X-Ref

return: string