class Devicons extends IconFactory

Implements a factory for Devicons icon objects

Methods

__construct(string|null $path = null)

Constructor

setIconName(string|null $iconName = null)

No description

__invoke(string $iconName, string $screenReaderText = null)

Creates an icon object

string
__toString()

No description

bool
getDecorative()

No description

setDecorative(bool $decorative)

No description

$this
useTitle(string|null $title)

Optionally pulls the icon to left or right

createIcon(string|null $name = null)

Creates an icon instance

void
setIconProperties(IconObject $icon)

No description

static IconObject
get(string $iconName)

Creates an icon object

i(string $iconName)

creates a new icon object

span(string $iconName)

creates a new icon object

$this
setColored(bool $colored)

Sets/unsets the width of the icon fixed

useSvgServerRoot(string $path)

No description

useSvgClientRoot(string $path)

No description

Svg
createSvg(string $name)

No description

Img
createSvgImg(string $name, string|null $alt = null)

No description

Details

at line 34
__construct(string|null $path = null)

Constructor

Parameters

string|null $path

in IconFactory at line 42
setIconName(string|null $iconName = null)

No description

Parameters

string|null $iconName

in IconFactory at line 53
IconObject __invoke(string $iconName, string $screenReaderText = null)

Creates an icon object

Parameters

string $iconName

the file type

string $screenReaderText

Return Value

IconObject

the corresponding component

in IconFactory at line 59
string __toString()

No description

Return Value

string

in IconFactory at line 63
bool getDecorative()

No description

Return Value

bool

in IconFactory at line 67
setDecorative(bool $decorative)

No description

Parameters

bool $decorative

in IconFactory at line 78
$this useTitle(string|null $title)

Optionally pulls the icon to left or right

Parameters

string|null $title

the direction of the pull

Return Value

$this

for a fluent interface

at line 41
IconObject createIcon(string|null $name = null)

Creates an icon instance

Parameters

string|null $name

Return Value

IconObject

Exceptions

InvalidArgumentException

if icon cannot be created

in IconFactory at line 109
void setIconProperties(IconObject $icon)

No description

Parameters

IconObject $icon

Return Value

void

in IconFactory at line 120
static IconObject get(string $iconName)

Creates an icon object

Parameters

string $iconName

Return Value

IconObject

the corresponding component

in IconFactory at line 28
Icon i(string $iconName)

creates a new icon object

Parameters

string $iconName

Return Value

Icon

in IconFactory at line 28
Icon span(string $iconName)

creates a new icon object

Parameters

string $iconName

Return Value

Icon

at line 63
$this setColored(bool $colored)

Sets/unsets the width of the icon fixed

Parameters

bool $colored

Return Value

$this

for a fluent interface

at line 68
useSvgServerRoot(string $path)

No description

Parameters

string $path

at line 76
useSvgClientRoot(string $path)

No description

Parameters

string $path

at line 101
Svg createSvg(string $name)

No description

Parameters

string $name

Return Value

Svg

at line 105
Img createSvgImg(string $name, string|null $alt = null)

No description

Parameters

string $name
string|null $alt

Return Value

Img