Skip to content

Spine

EPUB spine structure

Properties

tocItem

protected \SebLucas\EPubMeta\Data\Item $tocItem

tocFormat

protected string $tocFormat

items

protected array|\SebLucas\EPubMeta\Data\Item[] $items

Methods

__construct

Spine Constructor.

public __construct(\SebLucas\EPubMeta\Data\Item $tocItem, string $tocFormat): mixed

Parameters:

Parameter Type Description
$tocItem \SebLucas\EPubMeta\Data\Item The TOC Item of this Spine.
$tocFormat string The TOC Format of this Spine (Toc or Nav).

getTocItem

Get the TOC Item of this Spine.

public getTocItem(): \SebLucas\EPubMeta\Data\Item

getTocFormat

Get the TOC Format of this Spine.

public getTocFormat(): string

appendItem

Append an Item to this Spine.

public appendItem(\SebLucas\EPubMeta\Data\Item $item): void

Parameters:

Parameter Type Description
$item \SebLucas\EPubMeta\Data\Item The Item to append to this Spine.

current

Return the current Item while iterating this Spine.

public current(): \SebLucas\EPubMeta\Data\Item

See Also:

  • http://php.net/manual/en/iterator.current.php -

next

Move forward to next Item while iterating this Spine.

public next(): void

Return Value:

Any returned value is ignored.

See Also:

  • http://php.net/manual/en/iterator.next.php -

key

Return the index of the current Item while iterating this Spine.

public key(): int|null

Return Value:

on success, or null on failure.

See Also:

  • http://php.net/manual/en/iterator.key.php -

valid

Checks if current Iterator position is valid.

public valid(): bool

Return Value:

true on success or false on failure.

See Also:

  • http://php.net/manual/en/iterator.valid.php -

rewind

Rewind the Iterator to the first element.

public rewind(): void

Return Value:

Any returned value is ignored.

See Also:

  • http://php.net/manual/en/iterator.rewind.php -

first

Get the first Item of this Spine.

public first(): \SebLucas\EPubMeta\Data\Item

last

Get the last Item of this Spine.

public last(): \SebLucas\EPubMeta\Data\Item

count

Count items of this Spine.

public count(): int

Return Value:

The number of Items contained in this Spine.

See Also:

  • https://php.net/manual/en/countable.count.php -

offsetExists

Whether a offset exists

public offsetExists(int $offset): bool

Parameters:

Parameter Type Description
$offset int An offset to check for.

Return Value:

true on success or false on failure.

See Also:

  • https://php.net/manual/en/arrayaccess.offsetexists.php -

offsetGet

Offset to retrieve

public offsetGet(int $offset): \SebLucas\EPubMeta\Data\Item

Parameters:

Parameter Type Description
$offset int The offset to retrieve.

See Also:

  • https://php.net/manual/en/arrayaccess.offsetget.php -

offsetSet

Offset to set

public offsetSet(mixed $offset, mixed $value): void

Parameters:

Parameter Type Description
$offset mixed The offset to assign the value to.
$value mixed The value to set.

Throws:

See Also:

  • https://php.net/manual/en/arrayaccess.offsetset.php -

offsetUnset

Offset to unset

public offsetUnset(mixed $offset): void

Parameters:

Parameter Type Description
$offset mixed The offset to unset.

Throws:

See Also:

  • https://php.net/manual/en/arrayaccess.offsetunset.php -


Automatically generated on 2025-03-18