\Jkphl\MicrometaItem

Micro information item

Summary

Methods
Properties
Constants
__construct()
isOfType()
firstOf()
toObject()
__get()
$types
$id
$value
No constants found
_isItem()
_resolveUrlValue()
$_url
$_properties
$_urlProperties
N/A
No private methods found
No private properties found
N/A

Properties

$types

$types : \array

Item type list

Type

\array

$id

$id : \string

Explicit item ID

Type

\string

$value

$value : \string

Explicit item value

Type

\string

$_url

$_url : \Jkphl\Utility\Url

Item base URL (used for relative URL resolution)

Type

\Jkphl\Utility\Url

$_properties

$_properties : \array

List of nested properties

Type

\array

$_urlProperties

$_urlProperties : array

Properties holding URL strings (and that need to get expanded / sanitized)

Type

array

Methods

__construct()

__construct(\array $data, \Jkphl\Utility\Url $url) : \Jkphl\Micrometa\Item

Constructor

Parameters

\array $data

Item data

\Jkphl\Utility\Url $url

Item base URL

Returns

\Jkphl\Micrometa\Item

Micro information item

isOfType()

isOfType() : \boolean

Check if this item is of a specific type

Returns

\boolean —

If this item is of a specific type

firstOf()

firstOf() : \mixed

Return the first available property in a list of properties

Returns

\mixed —

Property value

toObject()

toObject() : \stdClass

Return a vanilla object representation of this item

Returns

\stdClass —

Vanilla object item representation

__get()

__get(\string $key) : \mixed

Return a list of properties or a single property

Parameters

\string $key

Property (list) name

Returns

\mixed —

Property (list) value(s)

_isItem()

_isItem(\mixed $item) : \boolean

Check if a subelement is a microcontent item itself

Parameters

\mixed $item

Subelement

Returns

\boolean —

Is an item

_resolveUrlValue()

_resolveUrlValue(\string $property, \mixed $value) : void

Sanitize URL values

Parameters

\string $property

Property name

\mixed $value

Value