From e3c315d149f32c1d72c4c1f39505bc7da43e595f Mon Sep 17 00:00:00 2001 From: Sebastian Meyer Date: Wed, 3 Apr 2024 22:32:46 +0200 Subject: [PATCH] Update documentation --- .../OCC-Basics-DataStructures-Collection.html | 1073 ------------- ...OCC-Basics-DataStructures-StrictArray.html | 420 ++++- .../OCC-Basics-DataStructures-StrictList.html | 162 +- ...OCC-Basics-DataStructures-StrictQueue.html | 238 ++- ...tructures-StrictSplDatastructureTrait.html | 1390 ----------------- ...OCC-Basics-DataStructures-StrictStack.html | 164 +- ...raits-StrictSplDoublyLinkedListTrait.html} | 180 +-- ...sics-InterfaceTraits-ArrayAccessTrait.html | 621 -------- ...Basics-InterfaceTraits-CountableTrait.html | 427 ----- ...nterfaceTraits-IteratorAggregateTrait.html | 427 ----- ...-Basics-InterfaceTraits-IteratorTrait.html | 658 -------- doc/files/src-datastructures-collection.html | 332 ---- ...tructures-strictspldatastructuretrait.html | 362 ----- ...raits-strictspldoublylinkedlisttrait.html} | 14 +- .../src-interfacetraits-arrayaccesstrait.html | 336 ---- .../src-interfacetraits-countabletrait.html | 336 ---- ...nterfacetraits-iteratoraggregatetrait.html | 336 ---- .../src-interfacetraits-iteratortrait.html | 336 ---- .../src/DataStructures/Collection.php.txt | 195 --- .../src/DataStructures/StrictArray.php.txt | 128 ++ .../src/DataStructures/StrictList.php.txt | 6 +- .../src/DataStructures/StrictQueue.php.txt | 21 +- .../StrictSplDatastructureTrait.php.txt | 420 ----- .../src/DataStructures/StrictStack.php.txt | 8 +- ...=> StrictSplDoublyLinkedListTrait.php.txt} | 2 +- .../ErrorHandlers/ThrowErrorException.php.txt | 8 +- .../TriggerExceptionError.php.txt | 2 +- .../InterfaceTraits/ArrayAccessTrait.php.txt | 113 -- .../InterfaceTraits/CountableTrait.php.txt | 64 - .../IteratorAggregateTrait.php.txt | 65 - .../src/InterfaceTraits/IteratorTrait.php.txt | 128 -- doc/guides/changelog.html | 29 +- doc/guides/changelog/index.html | 206 --- doc/guides/changelog/v1.0.0.html | 194 --- doc/guides/changelog/v1.0.1.html | 195 --- doc/guides/changelog/v1.1.0.html | 195 --- doc/guides/changelog/v2.0.0.html | 204 --- doc/guides/cheatsheet.html | 212 --- doc/guides/index.html | 2 + doc/guides/installation/index.html | 189 --- doc/guides/installation/test.html | 195 --- doc/indices/files.html | 2 +- doc/js/searchIndex.js | 97 +- .../occ-basics-datastructures-traits.html | 2 +- .../occ-basics-interfacetraits.html | 318 ---- doc/packages/Basics-DataStructures.html | 2 +- doc/packages/Basics-InterfaceTraits.html | 317 ---- 47 files changed, 1090 insertions(+), 10241 deletions(-) delete mode 100644 doc/classes/OCC-Basics-DataStructures-Collection.html delete mode 100644 doc/classes/OCC-Basics-DataStructures-StrictSplDatastructureTrait.html rename doc/classes/{OCC-Basics-DataStructures-Traits-StrictSplDatastructureTrait.html => OCC-Basics-DataStructures-Traits-StrictSplDoublyLinkedListTrait.html} (84%) delete mode 100644 doc/classes/OCC-Basics-InterfaceTraits-ArrayAccessTrait.html delete mode 100644 doc/classes/OCC-Basics-InterfaceTraits-CountableTrait.html delete mode 100644 doc/classes/OCC-Basics-InterfaceTraits-IteratorAggregateTrait.html delete mode 100644 doc/classes/OCC-Basics-InterfaceTraits-IteratorTrait.html delete mode 100644 doc/files/src-datastructures-collection.html delete mode 100644 doc/files/src-datastructures-strictspldatastructuretrait.html rename doc/files/{src-datastructures-traits-strictspldatastructuretrait.html => src-datastructures-traits-strictspldoublylinkedlisttrait.html} (93%) delete mode 100644 doc/files/src-interfacetraits-arrayaccesstrait.html delete mode 100644 doc/files/src-interfacetraits-countabletrait.html delete mode 100644 doc/files/src-interfacetraits-iteratoraggregatetrait.html delete mode 100644 doc/files/src-interfacetraits-iteratortrait.html delete mode 100644 doc/files/src/DataStructures/Collection.php.txt delete mode 100644 doc/files/src/DataStructures/StrictSplDatastructureTrait.php.txt rename doc/files/src/DataStructures/Traits/{StrictSplDatastructureTrait.php.txt => StrictSplDoublyLinkedListTrait.php.txt} (99%) delete mode 100644 doc/files/src/InterfaceTraits/ArrayAccessTrait.php.txt delete mode 100644 doc/files/src/InterfaceTraits/CountableTrait.php.txt delete mode 100644 doc/files/src/InterfaceTraits/IteratorAggregateTrait.php.txt delete mode 100644 doc/files/src/InterfaceTraits/IteratorTrait.php.txt delete mode 100644 doc/guides/changelog/index.html delete mode 100644 doc/guides/changelog/v1.0.0.html delete mode 100644 doc/guides/changelog/v1.0.1.html delete mode 100644 doc/guides/changelog/v1.1.0.html delete mode 100644 doc/guides/changelog/v2.0.0.html delete mode 100644 doc/guides/cheatsheet.html delete mode 100644 doc/guides/installation/index.html delete mode 100644 doc/guides/installation/test.html delete mode 100644 doc/namespaces/occ-basics-interfacetraits.html delete mode 100644 doc/packages/Basics-InterfaceTraits.html diff --git a/doc/classes/OCC-Basics-DataStructures-Collection.html b/doc/classes/OCC-Basics-DataStructures-Collection.html deleted file mode 100644 index aec9d8d..0000000 --- a/doc/classes/OCC-Basics-DataStructures-Collection.html +++ /dev/null @@ -1,1073 +0,0 @@ - - - - - PHP Basics - - - - - - - - - - - - - - - - - - - - - -
-

PHP Basics

- - - - - - -
- -
-
- - - - -
-
- - -
-

- Collection - - -
- in package - -
- - - implements - ArrayAccess, Countable, IteratorAggregate - - - Uses - ArrayAccessTrait, CountableTrait, IteratorAggregateTrait -

- -
- - -
- - - -

A generic collection of items.

- - - -
- Tags - - -
-
-
- author -
-
- -

Sebastian Meyer sebastian.meyer@opencultureconsulting.com

-
- -
-
- template -
-
- -

Item of mixed

-
- -
-
- - - -

- Table of Contents - - -

- - - -

- Interfaces - - -

-
-
ArrayAccess
Countable
IteratorAggregate
- - - - - - -

- Properties - - -

-
-
- $data - -  : array<string|int, TValue> -
-
Holds the iterable data.
- -
- -

- Methods - - -

-
-
- __construct() - -  : void -
-
Create a collection of items.
- -
- __get() - -  : Item|null -
-
Magic method to read collection items as properties.
- -
- __set() - -  : void -
-
Magic method to write collection items as properties.
- -
- add() - -  : void -
-
Add an item to the collection.
- -
- clear() - -  : void -
-
Clear the collection of any items.
- -
- copy() - -  : Collection<string|int, Item> -
-
Get a new collection with the same set of items.
- -
- get() - -  : Item|null -
-
Get the item at the specified index.
- -
- isEmpty() - -  : bool -
-
Check if collection is empty.
- -
- remove() - -  : void -
-
Remove an item from the collection.
- -
- set() - -  : void -
-
Set the item at the specified index.
- -
- toArray() - -  : array<string|int, Item> -
-
Return array representation of collection.
- -
- - - - - - - -
-

- Properties - - -

-
-

- $data - - - - -

- - -

Holds the iterable data.

- - - protected - array<string|int, TValue> - $data - = [] - - - - - -
-
- -
-

- Methods - - -

-
-

- __construct() - - -

- - -

Create a collection of items.

- - - public - __construct([array<string|int, Item$items = [] ]) : void - -
-
- -
Parameters
-
-
- $items - : array<string|int, Item> - = []
-
-

Initial set of items

-
- -
-
- - - - -
-
-

- __get() - - -

- - -

Magic method to read collection items as properties.

- - - public - __get(string|int $key) : Item|null - -
-
- -
Parameters
-
-
- $key - : string|int -
-
-

The item's index

-
- -
-
- - - -
-
Return values
- Item|null - — -

The item or NULL if key is invalid

-
- -
- -
-
-

- __set() - - -

- - -

Magic method to write collection items as properties.

- - - public - __set(string|int $key, Item $item) : void - -
-
- -
Parameters
-
-
- $key - : string|int -
-
-

The new item's index

-
- -
-
- $item - : Item -
-
-

The new item

-
- -
-
- - - - -
-
-

- add() - - -

- - -

Add an item to the collection.

- - - public - add(Item $item) : void - -
-
APIYes
- -
- -
Parameters
-
-
- $item - : Item -
-
-

The new item

-
- -
-
- - - - -
-
-

- clear() - - -

- - -

Clear the collection of any items.

- - - public - clear() : void - -
-
APIYes
- -
- - - - - -
-
-

- copy() - - -

- - -

Get a new collection with the same set of items.

- - - public - copy() : Collection<string|int, Item> - -
-
APIYes
- -
- - - - -
-
Return values
- Collection<string|int, Item> - — -

The new collection with the same items

-
- -
- -
-
-

- get() - - -

- - -

Get the item at the specified index.

- - - public - get(string|int $key) : Item|null - -
-
APIYes
- -
- -
Parameters
-
-
- $key - : string|int -
-
-

The item's index

-
- -
-
- - - -
-
Return values
- Item|null - — -

The item or NULL if key is invalid

-
- -
- -
-
-

- isEmpty() - - -

- - -

Check if collection is empty.

- - - public - isEmpty() : bool - -
-
APIYes
- -
- - - - -
-
Return values
- bool - — -

Whether the collection contains any items

-
- -
- -
-
-

- remove() - - -

- - -

Remove an item from the collection.

- - - public - remove(string|int $key) : void - -
-
APIYes
- -
- -
Parameters
-
-
- $key - : string|int -
-
-

The item's key

-
- -
-
- - - - -
-
-

- set() - - -

- - -

Set the item at the specified index.

- - - public - set(string|int $key, Item $item) : void - -
-
APIYes
- -
- -
Parameters
-
-
- $key - : string|int -
-
-

The new item's index

-
- -
-
- $item - : Item -
-
-

The new item

-
- -
-
- - - - -
-
-

- toArray() - - -

- - -

Return array representation of collection.

- - - public - toArray() : array<string|int, Item> - -
-
APIYes
- -
- - - - -
-
Return values
- array<string|int, Item> - — -

Array of collection items

-
- -
- -
-
- -
-
-
-
-

-        
- -
-
- - - -
-
-
- -
- On this page - - -
- -
-
-
-
-
-

Search results

- -
-
-
    -
    -
    -
    -
    - - -
    - - - - - - - - diff --git a/doc/classes/OCC-Basics-DataStructures-StrictArray.html b/doc/classes/OCC-Basics-DataStructures-StrictArray.html index 5195ebb..3f3cb9a 100644 --- a/doc/classes/OCC-Basics-DataStructures-StrictArray.html +++ b/doc/classes/OCC-Basics-DataStructures-StrictArray.html @@ -207,9 +207,9 @@

    A type-sensitive, traversable array.

    @@ -292,6 +292,13 @@

    Add/insert a item at the specified index.
    +
    + bottom() + +  : AllowedType +
    +
    Peek at the first item of the array.
    +
    clear() @@ -397,6 +404,13 @@

    Unset the specified offset.
    +
    + pop() + +  : AllowedType +
    +
    Pop the item from the end of the array.
    +
    prev() @@ -404,6 +418,13 @@

    Move back to previous item.
    +
    + push() + +  : void +
    +
    Push an item at the end of the array.
    +
    remove() @@ -439,6 +460,13 @@

    Set allowed data types.
    +
    + shift() + +  : AllowedType +
    +
    Shift the item from the beginning of the array.
    +
    toArray() @@ -446,6 +474,13 @@

    Return array representation of collection.
    +
    + top() + +  : AllowedType +
    +
    Peek at the last item of the array.
    +
    toStrictList() @@ -460,6 +495,13 @@

    Restore $this from string representation.
    +
    + unshift() + +  : void +
    +
    Prepend the array with an item.
    +
    valid() @@ -633,6 +675,66 @@
    + +
    +

    + bottom() + + +

    + + +

    Peek at the first item of the array.

    + + + public + bottom() : AllowedType + +
    +
    APIYes
    + +
    + + + +
    + Tags + + +
    +
    +
    + throws +
    +
    + RuntimeException + +

    if the array is empty

    +
    + +
    +
    + +
    +
    Return values
    + AllowedType + — +

    The first item of the array

    +
    + +
    +
    Parameters
    + +
    +

    + pop() + + +

    + + +

    Pop the item from the end of the array.

    + + + public + pop() : AllowedType + +
    +
    APIYes
    + +
    + + + +
    + Tags + + +
    +
    +
    + throws +
    +
    + RuntimeException + +

    if the array is empty

    +
    + +
    +
    + +
    +
    Return values
    + AllowedType + — +

    The last item of the array

    +
    + +
    +
    +
    +
    +

    + push() + + +

    + + +

    Push an item at the end of the array.

    + + + public + push(AllowedType $value) : void + +
    +
    APIYes
    + +
    + +
    Parameters
    +
    +
    + $value + : AllowedType +
    +
    +

    The item to push

    +
    + +
    +
    + + +
    + Tags + + +
    +
    +
    + throws +
    +
    + InvalidDataTypeException + +

    if $value is not of allowed type

    +
    + +
    +
    + +
    +
    +
    +

    + shift() + + +

    + + +

    Shift the item from the beginning of the array.

    + + + public + shift() : AllowedType + +
    +
    APIYes
    + +
    + + + +
    + Tags + + +
    +
    +
    + throws +
    +
    + RuntimeException + +

    if the array is empty

    +
    + +
    +
    + +
    +
    Return values
    + AllowedType + — +

    The first item of the array

    +
    + +
    +
    Return values

    + +
    +

    + top() + + +

    + + +

    Peek at the last item of the array.

    + + + public + top() : AllowedType + +
    +
    APIYes
    + +
    + + + +
    + Tags + + +
    +
    +
    + throws +
    +
    + RuntimeException + +

    if the array is empty

    +
    + +
    +
    + +
    +
    Return values
    + AllowedType + — +

    The last item of the array

    +
    + +
    +
    Parameters +
    +
    +

    + unshift() + + +

    + + +

    Prepend the array with an item.

    + + + public + unshift(AllowedType $value) : void + +
    +
    APIYes
    + +
    + +
    Parameters
    +
    +
    + $value + : AllowedType +
    +
    +

    The item to unshift

    +
    + +
    +
    + + +
    + Tags + + +
    +
    +
    + throws +
    +
    + InvalidDataTypeException + +

    if $value is not of allowed type

    +
    + +
    +
    + +
    Return values diff --git a/doc/classes/OCC-Basics-DataStructures-StrictList.html b/doc/classes/OCC-Basics-DataStructures-StrictList.html index 1b110f3..0442e8f 100644 --- a/doc/classes/OCC-Basics-DataStructures-StrictList.html +++ b/doc/classes/OCC-Basics-DataStructures-StrictList.html @@ -193,7 +193,7 @@

    Uses - StrictSplDatastructureTrait + StrictSplDoublyLinkedListTrait

    @@ -267,98 +267,98 @@

    - __construct() + __construct()  : void
    Create a type-sensitive, traversable list of items.
    - add() + add()  : void
    Add/insert a new item at the specified offset.
    - append() + append()  : void
    Append items at the end of the list.
    - clear() + clear()  : void
    Clear the list of any items.
    - get() + get()  : AllowedType
    Get the item at the specified index.
    - isList() + isList()  : true
    Check if this can be considered a list.
    - offsetSet() + offsetSet()  : void
    Set the item at the specified offset.
    - prepend() + prepend()  : void
    Prepend items at the start of the list.
    - push() + push()  : void
    Push an item at the end of the list.
    - remove() + remove()  : void
    Remove an item from the list.
    - set() + set()  : void
    Set an item at the specified index.
    - toArray() + toArray()  : array<int, AllowedType>
    Return array representation of list.
    - toStrictCollection() + toStrictCollection()  : StrictCollection<string|int, AllowedType>
    Turn list into a type-sensitive collection.
    - unshift() + unshift()  : void
    @@ -387,15 +387,15 @@

    >

    __construct() - +

    Create a type-sensitive, traversable list of items.

    @@ -440,7 +440,7 @@
    Parameters
    Tags - +
    @@ -466,15 +466,15 @@
    >

    add() - +

    Add/insert a new item at the specified offset.

    @@ -513,7 +513,7 @@
    Parameters
    Tags - +
    @@ -549,15 +549,15 @@
    >

    append() - +

    Append items at the end of the list.

    @@ -587,7 +587,7 @@
    Parameters
    Tags - +
    @@ -613,15 +613,15 @@
    >

    clear() - +

    Clear the list of any items.

    @@ -648,15 +648,15 @@

    >

    get() - +

    Get the item at the specified index.

    @@ -686,7 +686,7 @@
    Parameters
    Tags - +
    @@ -720,15 +720,15 @@
    Return values
    >

    isList() - +

    Check if this can be considered a list.

    @@ -763,15 +763,15 @@
    Return values
    >

    offsetSet() - +

    Set the item at the specified offset.

    @@ -810,7 +810,7 @@
    Parameters
    Tags - +
    @@ -846,15 +846,15 @@
    >

    prepend() - +

    Prepend items at the start of the list.

    @@ -884,7 +884,7 @@
    Parameters
    Tags - +
    @@ -910,15 +910,15 @@
    >

    push() - +

    Push an item at the end of the list.

    @@ -948,7 +948,7 @@
    Parameters
    Tags - +
    @@ -974,15 +974,15 @@
    >

    remove() - +

    Remove an item from the list.

    @@ -1012,7 +1012,7 @@
    Parameters
    Tags - +
    @@ -1038,15 +1038,15 @@
    >

    set() - +

    Set an item at the specified index.

    @@ -1085,7 +1085,7 @@
    Parameters
    Tags - +
    @@ -1111,15 +1111,15 @@
    >

    toArray() - +

    Return array representation of list.

    @@ -1154,15 +1154,15 @@
    Return values
    >

    toStrictCollection() - +

    Turn list into a type-sensitive collection.

    @@ -1197,15 +1197,15 @@
    Return values
    >

    unshift() - +

    Prepend the list with an item.

    @@ -1235,7 +1235,7 @@
    Parameters
    Tags - +
    @@ -1366,20 +1366,20 @@
  • Methods
  • diff --git a/doc/classes/OCC-Basics-DataStructures-StrictQueue.html b/doc/classes/OCC-Basics-DataStructures-StrictQueue.html index 6c1569b..cc20c8c 100644 --- a/doc/classes/OCC-Basics-DataStructures-StrictQueue.html +++ b/doc/classes/OCC-Basics-DataStructures-StrictQueue.html @@ -193,7 +193,7 @@

    Uses - StrictSplDatastructureTrait + StrictSplDoublyLinkedListTrait

    @@ -204,9 +204,9 @@

    A type-sensitive, taversable queue (FIFO).

    @@ -267,33 +267,40 @@

    - __construct() + __construct()  : void
    Create a type-sensitive, traversable list of items.
    - add() + add()  : void
    Add/insert a new item at the specified offset.
    - append() + append()  : void
    Append items at the end of the list.
    - clear() + clear()  : void
    Clear the list of any items.
    +
    + dequeue() + +  : AllowedType +
    +
    Dequeue an item from the queue.
    +
    enqueue() @@ -302,70 +309,70 @@

    Add an item to the queue.
    - get() + get()  : AllowedType
    Get the item at the specified index.
    - isList() + isList()  : true
    Check if this can be considered a list.
    - offsetSet() + offsetSet()  : void
    Set the item at the specified offset.
    - prepend() + prepend()  : void
    Prepend items at the start of the list.
    - push() + push()  : void
    Push an item at the end of the list.
    - remove() + remove()  : void
    Remove an item from the list.
    - set() + set()  : void
    Set an item at the specified index.
    - toArray() + toArray()  : array<int, AllowedType>
    Return array representation of list.
    - toStrictCollection() + toStrictCollection()  : StrictCollection<string|int, AllowedType>
    Turn list into a type-sensitive collection.
    - unshift() + unshift()  : void
    @@ -394,15 +401,15 @@

    >

    __construct() - +

    Create a type-sensitive, traversable list of items.

    @@ -447,7 +454,7 @@
    Parameters
    Tags - +
    @@ -473,15 +480,15 @@
    >

    add() - +

    Add/insert a new item at the specified offset.

    @@ -520,7 +527,7 @@
    Parameters
    Tags - +
    @@ -556,15 +563,15 @@
    >

    append() - +

    Append items at the end of the list.

    @@ -594,7 +601,7 @@
    Parameters
    Tags - +
    @@ -620,15 +627,15 @@
    >

    clear() - +

    Clear the list of any items.

    @@ -646,6 +653,66 @@

    +

    +
    +

    + dequeue() + + +

    + + +

    Dequeue an item from the queue.

    + + + public + dequeue() : AllowedType + +
    +
    APIYes
    + +
    + + + +
    + Tags + + +
    +
    +
    + throws +
    +
    + RuntimeException + +

    if the queue is empty

    +
    + +
    +
    + +
    +
    Return values
    + AllowedType + — +

    The dequeued item

    +
    + +
    +

    Add an item to the queue.

    @@ -719,15 +786,15 @@
    >

    get() - +

    Get the item at the specified index.

    @@ -757,7 +824,7 @@
    Parameters
    Tags - +
    @@ -791,15 +858,15 @@
    Return values
    >

    isList() - +

    Check if this can be considered a list.

    @@ -834,15 +901,15 @@
    Return values
    >

    offsetSet() - +

    Set the item at the specified offset.

    @@ -881,7 +948,7 @@
    Parameters
    Tags - +
    @@ -917,15 +984,15 @@
    >

    prepend() - +

    Prepend items at the start of the list.

    @@ -955,7 +1022,7 @@
    Parameters
    Tags - +
    @@ -981,15 +1048,15 @@
    >

    push() - +

    Push an item at the end of the list.

    @@ -1019,7 +1086,7 @@
    Parameters
    Tags - +
    @@ -1045,15 +1112,15 @@
    >

    remove() - +

    Remove an item from the list.

    @@ -1083,7 +1150,7 @@
    Parameters
    Tags - +
    @@ -1109,15 +1176,15 @@
    >

    set() - +

    Set an item at the specified index.

    @@ -1156,7 +1223,7 @@
    Parameters
    Tags - +
    @@ -1182,15 +1249,15 @@
    >

    toArray() - +

    Return array representation of list.

    @@ -1225,15 +1292,15 @@
    Return values
    >

    toStrictCollection() - +

    Turn list into a type-sensitive collection.

    @@ -1268,15 +1335,15 @@
    Return values
    >

    unshift() - +

    Prepend the list with an item.

    @@ -1306,7 +1373,7 @@
    Parameters
    Tags - +
    @@ -1437,21 +1504,22 @@
  • Methods
  • diff --git a/doc/classes/OCC-Basics-DataStructures-StrictSplDatastructureTrait.html b/doc/classes/OCC-Basics-DataStructures-StrictSplDatastructureTrait.html deleted file mode 100644 index 2552eec..0000000 --- a/doc/classes/OCC-Basics-DataStructures-StrictSplDatastructureTrait.html +++ /dev/null @@ -1,1390 +0,0 @@ - - - - - PHP Basics - - - - - - - - - - - - - - - - - - - - - -
    -

    PHP Basics

    - - - - - - -
    - -
    -
    - - - - -
    -
    - - -
    -

    - StrictSplDatastructureTrait -

    - - - -

    The common interface of all type-sensitive, SPL-based datastructures.

    - -

    This extends all methods of the common interface of the Standard PHP Library -Doubly Linked List Datastructures -by type-checking to only allow specified data types on the list.

    -
    - - -
    - Tags - - -
    -
    -
    - author -
    -
    - -

    Sebastian Meyer sebastian.meyer@opencultureconsulting.com

    -
    - -
    -
    - template -
    -
    - -

    AllowedType of mixed

    -
    - -
    -
    - - - -

    - Table of Contents - - -

    - - - - - - - - - - -

    - Methods - - -

    -
    -
    - __construct() - -  : void -
    -
    Create a type-sensitive, traversable list of items.
    - -
    - add() - -  : void -
    -
    Add/insert a new item at the specified offset.
    - -
    - append() - -  : void -
    -
    Append items at the end of the list.
    - -
    - clear() - -  : void -
    -
    Clear the list of any items.
    - -
    - get() - -  : AllowedType -
    -
    Get the item at the specified index.
    - -
    - isList() - -  : true -
    -
    Check if this can be considered a list.
    - -
    - offsetSet() - -  : void -
    -
    Set the item at the specified offset.
    - -
    - prepend() - -  : void -
    -
    Prepend items at the start of the list.
    - -
    - push() - -  : void -
    -
    Push an item at the end of the list.
    - -
    - remove() - -  : void -
    -
    Remove an item from the list.
    - -
    - set() - -  : void -
    -
    Set an item at the specified index.
    - -
    - toArray() - -  : array<int, AllowedType> -
    -
    Return array representation of list.
    - -
    - toStrictCollection() - -  : StrictCollection<string|int, AllowedType> -
    -
    Turn list into a type-sensitive collection.
    - -
    - unshift() - -  : void -
    -
    Prepend the list with an item.
    - -
    - - - - - - - - -
    -

    - Methods - - -

    -
    -

    - __construct() - - -

    - - -

    Create a type-sensitive, traversable list of items.

    - - - public - __construct([array<string|int, string> $allowedTypes = [] ]) : void - -
    -
    - -
    Parameters
    -
    -
    - $allowedTypes - : array<string|int, string> - = []
    -
    -

    Allowed data types of items (optional)

    -

    If empty, all types are allowed. -Possible values are:

    -
      -
    • "array"
    • -
    • "bool"
    • -
    • "callable"
    • -
    • "countable"
    • -
    • "float" or "double"
    • -
    • "int" or "integer" or "long"
    • -
    • "iterable"
    • -
    • "null"
    • -
    • "numeric"
    • -
    • "object" or FQCN
    • -
    • "resource"
    • -
    • "scalar"
    • -
    • "string"
    • -
    -
    - -
    -
    - - -
    - Tags - - -
    -
    -
    - throws -
    -
    - InvalidArgumentException - -

    if any value of $allowedTypes is not a string

    -
    - -
    -
    - - -
    -
    -

    - add() - - -

    - - -

    Add/insert a new item at the specified offset.

    - - - public - add(int $offset, AllowedType $value) : void - -
    -
    APIYes
    - -
    - -
    Parameters
    -
    -
    - $offset - : int -
    -
    -

    The offset where the new item is to be inserted

    -
    - -
    -
    - $value - : AllowedType -
    -
    -

    The new item for the offset

    -
    - -
    -
    - - -
    - Tags - - -
    -
    -
    - throws -
    -
    - InvalidArgumentException - -

    if $value is not of allowed type

    -
    - -
    -
    - throws -
    -
    - OutOfRangeException - -

    when $offset is out of bounds

    -
    - -
    -
    - - -
    -
    -

    - append() - - -

    - - -

    Append items at the end of the list.

    - - - public - append(AllowedType ...$values) : void - -
    -
    APIYes
    - -
    - -
    Parameters
    -
    -
    - $values - : AllowedType -
    -
    -

    One or more items to append

    -
    - -
    -
    - - -
    - Tags - - -
    -
    -
    - throws -
    -
    - InvalidArgumentException - -

    if any $values is not of allowed type

    -
    - -
    -
    - - -
    -
    -

    - clear() - - -

    - - -

    Clear the list of any items.

    - - - public - clear() : void - -
    -
    APIYes
    - -
    - - - - - -
    -
    -

    - get() - - -

    - - -

    Get the item at the specified index.

    - - - public - get(int $offset) : AllowedType - -
    -
    APIYes
    - -
    - -
    Parameters
    -
    -
    - $offset - : int -
    -
    -

    The item's index

    -
    - -
    -
    - - -
    - Tags - - -
    -
    -
    - throws -
    -
    - OutOfRangeException - -

    when $offset is out of bounds

    -
    - -
    -
    - -
    -
    Return values
    - AllowedType - — -

    The item

    -
    - -
    - -
    -
    -

    - isList() - - -

    - - -

    Check if this can be considered a list.

    - - - public - isList() : true - -
    -
    APIYes
    - -
    - - - - -
    -
    Return values
    - true - — -

    Always TRUE (this exists only for compatibility reasons)

    -
    - -
    - -
    -
    -

    - offsetSet() - - -

    - - -

    Set the item at the specified offset.

    - - - public - offsetSet(int|null $offset, AllowedType $value) : void - -
    -
    APIYes
    - -
    - -
    Parameters
    -
    -
    - $offset - : int|null -
    -
    -

    The offset being set or NULL to append

    -
    - -
    -
    - $value - : AllowedType -
    -
    -

    The new item for the offset

    -
    - -
    -
    - - -
    - Tags - - -
    -
    -
    - throws -
    -
    - InvalidArgumentException - -

    if $value is not of allowed type

    -
    - -
    -
    - throws -
    -
    - OutOfRangeException - -

    when $offset is out of bounds

    -
    - -
    -
    - - -
    -
    -

    - prepend() - - -

    - - -

    Prepend items at the start of the list.

    - - - public - prepend(AllowedType ...$values) : void - -
    -
    APIYes
    - -
    - -
    Parameters
    -
    -
    - $values - : AllowedType -
    -
    -

    One or more items to prepend

    -
    - -
    -
    - - -
    - Tags - - -
    -
    -
    - throws -
    -
    - InvalidArgumentException - -

    if $value is not of allowed type

    -
    - -
    -
    - - -
    -
    -

    - push() - - -

    - - -

    Push an item at the end of the list.

    - - - public - push(AllowedType $value) : void - -
    -
    APIYes
    - -
    - -
    Parameters
    -
    -
    - $value - : AllowedType -
    -
    -

    The item to push

    -
    - -
    -
    - - -
    - Tags - - -
    -
    -
    - throws -
    -
    - InvalidArgumentException - -

    if $value is not of allowed type

    -
    - -
    -
    - - -
    -
    -

    - remove() - - -

    - - -

    Remove an item from the list.

    - - - public - remove(int $offset) : void - -
    -
    APIYes
    - -
    - -
    Parameters
    -
    -
    - $offset - : int -
    -
    -

    The item's index

    -
    - -
    -
    - - -
    - Tags - - -
    -
    -
    - throws -
    -
    - OutOfRangeException - -

    when $offset is out of bounds

    -
    - -
    -
    - - -
    -
    -

    - set() - - -

    - - -

    Set an item at the specified index.

    - - - public - set(int $offset, AllowedType $value) : void - -
    -
    APIYes
    - -
    - -
    Parameters
    -
    -
    - $offset - : int -
    -
    -

    The item's index

    -
    - -
    -
    - $value - : AllowedType -
    -
    -

    The item

    -
    - -
    -
    - - -
    - Tags - - -
    -
    -
    - throws -
    -
    - InvalidArgumentException - -

    if $value is not of allowed type

    -
    - -
    -
    - - -
    -
    -

    - toArray() - - -

    - - -

    Return array representation of list.

    - - - public - toArray() : array<int, AllowedType> - -
    -
    APIYes
    - -
    - - - - -
    -
    Return values
    - array<int, AllowedType> - — -

    Array of list items

    -
    - -
    - -
    -
    -

    - toStrictCollection() - - -

    - - -

    Turn list into a type-sensitive collection.

    - - - public - toStrictCollection() : StrictCollection<string|int, AllowedType> - -
    -
    APIYes
    - -
    - - - - -
    -
    Return values
    - StrictCollection<string|int, AllowedType> - — -

    A type-sensitive collection of the list's items

    -
    - -
    - -
    -
    -

    - unshift() - - -

    - - -

    Prepend the list with an item.

    - - - public - unshift(AllowedType $value) : void - -
    -
    APIYes
    - -
    - -
    Parameters
    -
    -
    - $value - : AllowedType -
    -
    -

    The item to unshift

    -
    - -
    -
    - - -
    - Tags - - -
    -
    -
    - throws -
    -
    - InvalidArgumentException - -

    if $value is not of allowed type

    -
    - -
    -
    - - -
    -
    - -
    -
    -
    -
    -
    
    -        
    - -
    -
    - - - -
    -
    -
    - -
    - On this page - - -
    - -
    -
    -
    -
    -
    -

    Search results

    - -
    -
    -
      -
      -
      -
      -
      - - -
      - - - - - - - - diff --git a/doc/classes/OCC-Basics-DataStructures-StrictStack.html b/doc/classes/OCC-Basics-DataStructures-StrictStack.html index eda751b..98a8e5f 100644 --- a/doc/classes/OCC-Basics-DataStructures-StrictStack.html +++ b/doc/classes/OCC-Basics-DataStructures-StrictStack.html @@ -193,7 +193,7 @@

      Uses - StrictSplDatastructureTrait + StrictSplDoublyLinkedListTrait

      @@ -267,77 +267,77 @@

      - __construct() + __construct()  : void
      Create a type-sensitive, traversable list of items.
      - add() + add()  : void
      Add/insert a new item at the specified offset.
      - append() + append()  : void
      Append items at the end of the list.
      - clear() + clear()  : void
      Clear the list of any items.
      - get() + get()  : AllowedType
      Get the item at the specified index.
      - isList() + isList()  : true
      Check if this can be considered a list.
      - offsetSet() + offsetSet()  : void
      Set the item at the specified offset.
      - prepend() + prepend()  : void
      Prepend items at the start of the list.
      - push() + push()  : void
      Push an item at the end of the list.
      - remove() + remove()  : void
      Remove an item from the list.
      - set() + set()  : void
      @@ -351,21 +351,21 @@

      Add an item to the stack.
      - toArray() + toArray()  : array<int, AllowedType>
      Return array representation of list.
      - toStrictCollection() + toStrictCollection()  : StrictCollection<string|int, AllowedType>
      Turn list into a type-sensitive collection.
      - unshift() + unshift()  : void
      @@ -401,15 +401,15 @@

      >

      __construct() - +

      Create a type-sensitive, traversable list of items.

      @@ -454,7 +454,7 @@
      Parameters
      Tags - +
      @@ -480,15 +480,15 @@
      >

      add() - +

      Add/insert a new item at the specified offset.

      @@ -527,7 +527,7 @@
      Parameters
      Tags - +
      @@ -563,15 +563,15 @@
      >

      append() - +

      Append items at the end of the list.

      @@ -601,7 +601,7 @@
      Parameters
      Tags - +
      @@ -627,15 +627,15 @@
      >

      clear() - +

      Clear the list of any items.

      @@ -662,15 +662,15 @@

      >

      get() - +

      Get the item at the specified index.

      @@ -700,7 +700,7 @@
      Parameters
      Tags - +
      @@ -734,15 +734,15 @@
      Return values
      >

      isList() - +

      Check if this can be considered a list.

      @@ -777,15 +777,15 @@
      Return values
      >

      offsetSet() - +

      Set the item at the specified offset.

      @@ -824,7 +824,7 @@
      Parameters
      Tags - +
      @@ -860,15 +860,15 @@
      >

      prepend() - +

      Prepend items at the start of the list.

      @@ -898,7 +898,7 @@
      Parameters
      Tags - +
      @@ -924,15 +924,15 @@
      >

      push() - +

      Push an item at the end of the list.

      @@ -962,7 +962,7 @@
      Parameters
      Tags - +
      @@ -988,15 +988,15 @@
      >

      remove() - +

      Remove an item from the list.

      @@ -1026,7 +1026,7 @@
      Parameters
      Tags - +
      @@ -1052,15 +1052,15 @@
      >

      set() - +

      Set an item at the specified index.

      @@ -1099,7 +1099,7 @@
      Parameters
      Tags - +
      @@ -1189,15 +1189,15 @@
      >

      toArray() - +

      Return array representation of list.

      @@ -1232,15 +1232,15 @@
      Return values
      >

      toStrictCollection() - +

      Turn list into a type-sensitive collection.

      @@ -1275,15 +1275,15 @@
      Return values
      >

      unshift() - +

      Prepend the list with an item.

      @@ -1313,7 +1313,7 @@
      Parameters
      Tags - +
      @@ -1375,7 +1375,7 @@
      RuntimeException -

      if the list is empty

      +

      if the stack is empty

      @@ -1504,21 +1504,21 @@
      Return values
    • Methods
    • diff --git a/doc/classes/OCC-Basics-DataStructures-Traits-StrictSplDatastructureTrait.html b/doc/classes/OCC-Basics-DataStructures-Traits-StrictSplDoublyLinkedListTrait.html similarity index 84% rename from doc/classes/OCC-Basics-DataStructures-Traits-StrictSplDatastructureTrait.html rename to doc/classes/OCC-Basics-DataStructures-Traits-StrictSplDoublyLinkedListTrait.html index 56b9ac9..5a100fc 100644 --- a/doc/classes/OCC-Basics-DataStructures-Traits-StrictSplDatastructureTrait.html +++ b/doc/classes/OCC-Basics-DataStructures-Traits-StrictSplDoublyLinkedListTrait.html @@ -177,15 +177,15 @@

      Fil

      - StrictSplDatastructureTrait + StrictSplDoublyLinkedListTrait

      The common interface of all type-sensitive, SPL-based datastructures.

      @@ -198,7 +198,7 @@

      Tags - +
      @@ -235,7 +235,7 @@

      Table of Contents - +

      @@ -250,103 +250,103 @@

      Methods - +

      - __construct() + __construct()  : void
      Create a type-sensitive, traversable list of items.
      - add() + add()  : void
      Add/insert a new item at the specified offset.
      - append() + append()  : void
      Append items at the end of the list.
      - clear() + clear()  : void
      Clear the list of any items.
      - get() + get()  : AllowedType
      Get the item at the specified index.
      - isList() + isList()  : true
      Check if this can be considered a list.
      - offsetSet() + offsetSet()  : void
      Set the item at the specified offset.
      - prepend() + prepend()  : void
      Prepend items at the start of the list.
      - push() + push()  : void
      Push an item at the end of the list.
      - remove() + remove()  : void
      Remove an item from the list.
      - set() + set()  : void
      Set an item at the specified index.
      - toArray() + toArray()  : array<int, AllowedType>
      Return array representation of list.
      - toStrictCollection() + toStrictCollection()  : StrictCollection<string|int, AllowedType>
      Turn list into a type-sensitive collection.
      - unshift() + unshift()  : void
      @@ -364,7 +364,7 @@

      Methods - +

      >

      __construct() - +

      Create a type-sensitive, traversable list of items.

      @@ -428,7 +428,7 @@
      Parameters
      Tags - +
      @@ -454,15 +454,15 @@
      >

      add() - +

      Add/insert a new item at the specified offset.

      @@ -501,7 +501,7 @@
      Parameters
      Tags - +
      @@ -537,15 +537,15 @@
      >

      append() - +

      Append items at the end of the list.

      @@ -575,7 +575,7 @@
      Parameters
      Tags - +
      @@ -601,15 +601,15 @@
      >

      clear() - +

      Clear the list of any items.

      @@ -636,15 +636,15 @@

      >

      get() - +

      Get the item at the specified index.

      @@ -674,7 +674,7 @@
      Parameters
      Tags - +
      @@ -708,15 +708,15 @@
      Return values
      >

      isList() - +

      Check if this can be considered a list.

      @@ -751,15 +751,15 @@
      Return values
      >

      offsetSet() - +

      Set the item at the specified offset.

      @@ -798,7 +798,7 @@
      Parameters
      Tags - +
      @@ -834,15 +834,15 @@
      >

      prepend() - +

      Prepend items at the start of the list.

      @@ -872,7 +872,7 @@
      Parameters
      Tags - +
      @@ -898,15 +898,15 @@
      >

      push() - +

      Push an item at the end of the list.

      @@ -936,7 +936,7 @@
      Parameters
      Tags - +
      @@ -962,15 +962,15 @@
      >

      remove() - +

      Remove an item from the list.

      @@ -1000,7 +1000,7 @@
      Parameters
      Tags - +
      @@ -1026,15 +1026,15 @@
      >

      set() - +

      Set an item at the specified index.

      @@ -1073,7 +1073,7 @@
      Parameters
      Tags - +
      @@ -1099,15 +1099,15 @@
      >

      toArray() - +

      Return array representation of list.

      @@ -1142,15 +1142,15 @@
      Return values
      >

      toStrictCollection() - +

      Turn list into a type-sensitive collection.

      @@ -1185,15 +1185,15 @@
      Return values
      >

      unshift() - +

      Prepend the list with an item.

      @@ -1223,7 +1223,7 @@
      Parameters
      Tags - +
      @@ -1247,7 +1247,7 @@
      -
      
      +            
      
               
      @@ -1346,26 +1346,26 @@
    • Table Of Contents
    • Methods
    • @@ -1385,7 +1385,7 @@

      Search results

      - + diff --git a/doc/classes/OCC-Basics-InterfaceTraits-ArrayAccessTrait.html b/doc/classes/OCC-Basics-InterfaceTraits-ArrayAccessTrait.html deleted file mode 100644 index fc170ab..0000000 --- a/doc/classes/OCC-Basics-InterfaceTraits-ArrayAccessTrait.html +++ /dev/null @@ -1,621 +0,0 @@ - - - - - PHP Basics - - - - - - - - - - - - - - - - - - - - - -
      -

      PHP Basics

      - - - - - - -
      - -
      -
      - - - - -
      -
      - - -
      -

      - ArrayAccessTrait -

      - - - -

      A generic implementation of the ArrayAccess interface.

      - -

      Internally it accesses the protected $_data array.

      -
      - - -
      - Tags - - -
      -
      -
      - author -
      -
      - -

      Sebastian Meyer sebastian.meyer@opencultureconsulting.com

      -
      - -
      -
      - template -
      -
      - -

      TValue of mixed

      -
      - -
      -
      - - - -

      - Table of Contents - - -

      - - - - - - - - - - -

      - Methods - - -

      -
      -
      - offsetExists() - -  : bool -
      -
      Check if the specified offset exists.
      - -
      - offsetGet() - -  : TValue|null -
      -
      Retrieve data at the specified offset.
      - -
      - offsetSet() - -  : void -
      -
      Assign a value to the specified offset.
      - -
      - offsetUnset() - -  : void -
      -
      Unset the specified offset.
      - -
      - - - - - - - - -
      -

      - Methods - - -

      -
      -

      - offsetExists() - - -

      - - -

      Check if the specified offset exists.

      - - - public - offsetExists(string|int $offset) : bool - -
      -
      APIYes
      - -
      - -
      Parameters
      -
      -
      - $offset - : string|int -
      -
      -

      The offset to check for

      -
      - -
      -
      - - - -
      -
      Return values
      - bool - — -

      Whether the offset exists

      -
      - -
      - -
      -
      -

      - offsetGet() - - -

      - - -

      Retrieve data at the specified offset.

      - - - public - offsetGet(string|int $offset) : TValue|null - -
      -
      APIYes
      - -
      - -
      Parameters
      -
      -
      - $offset - : string|int -
      -
      -

      The offset to retrieve

      -
      - -
      -
      - - - -
      -
      Return values
      - TValue|null - — -

      The value at the offset or NULL if invalid

      -
      - -
      - -
      -
      -

      - offsetSet() - - -

      - - -

      Assign a value to the specified offset.

      - - - public - offsetSet(string|int|null $offset, TValue $value) : void - -
      -
      APIYes
      - -
      - -
      Parameters
      -
      -
      - $offset - : string|int|null -
      -
      -

      The offset to assign to or NULL to append

      -
      - -
      -
      - $value - : TValue -
      -
      -

      The value to set

      -
      - -
      -
      - - - - -
      -
      -

      - offsetUnset() - - -

      - - -

      Unset the specified offset.

      - - - public - offsetUnset(string|int $offset) : void - -
      -
      APIYes
      - -
      - -
      Parameters
      -
      -
      - $offset - : string|int -
      -
      -

      The offset to unset

      -
      - -
      -
      - - - - -
      -
      - -
      -
      -
      -
      -
      
      -        
      - -
      -
      - - - -
      -
      -
      - -
      - On this page - - -
      - -
      -
      -
      -
      -
      -

      Search results

      - -
      -
      -
        -
        -
        -
        -
        - - -
        - - - - - - - - diff --git a/doc/classes/OCC-Basics-InterfaceTraits-CountableTrait.html b/doc/classes/OCC-Basics-InterfaceTraits-CountableTrait.html deleted file mode 100644 index 408284c..0000000 --- a/doc/classes/OCC-Basics-InterfaceTraits-CountableTrait.html +++ /dev/null @@ -1,427 +0,0 @@ - - - - - PHP Basics - - - - - - - - - - - - - - - - - - - - - -
        -

        PHP Basics

        - - - - - - -
        - -
        -
        - - - - -
        -
        - - -
        -

        - CountableTrait -

        - - - -

        A generic implementation of the Countable interface.

        - -

        Internally it counts the values of the protected $_data array.

        -
        - - -
        - Tags - - -
        -
        -
        - author -
        -
        - -

        Sebastian Meyer sebastian.meyer@opencultureconsulting.com

        -
        - -
        -
        - template -
        -
        - -

        TValue of mixed

        -
        - -
        -
        - - - -

        - Table of Contents - - -

        - - - - - - - - - - -

        - Methods - - -

        -
        -
        - count() - -  : int<0, max> -
        -
        Count the data items.
        - -
        - - - - - - - - -
        -

        - Methods - - -

        -
        -

        - count() - - -

        - - -

        Count the data items.

        - - - public - count() : int<0, max> - -
        -
        APIYes
        - -
        - - - - -
        -
        Return values
        - int<0, max> - — -

        The number of data items

        -
        - -
        - -
        -
        - -
        -
        -
        -
        -
        
        -        
        - -
        -
        - - - -
        -
        -
        - -
        - On this page - - -
        - -
        -
        -
        -
        -
        -

        Search results

        - -
        -
        -
          -
          -
          -
          -
          - - -
          - - - - - - - - diff --git a/doc/classes/OCC-Basics-InterfaceTraits-IteratorAggregateTrait.html b/doc/classes/OCC-Basics-InterfaceTraits-IteratorAggregateTrait.html deleted file mode 100644 index 05b7c75..0000000 --- a/doc/classes/OCC-Basics-InterfaceTraits-IteratorAggregateTrait.html +++ /dev/null @@ -1,427 +0,0 @@ - - - - - PHP Basics - - - - - - - - - - - - - - - - - - - - - -
          -

          PHP Basics

          - - - - - - -
          - -
          -
          - - - - -
          -
          - - -
          -

          - IteratorAggregateTrait -

          - - - -

          A generic implementation of the IteratorAggregate interface.

          - -

          Internally it iterates over the protected $_data array.

          -
          - - -
          - Tags - - -
          -
          -
          - author -
          -
          - -

          Sebastian Meyer sebastian.meyer@opencultureconsulting.com

          -
          - -
          -
          - template -
          -
          - -

          TValue of mixed

          -
          - -
          -
          - - - -

          - Table of Contents - - -

          - - - - - - - - - - -

          - Methods - - -

          -
          -
          - getIterator() - -  : ArrayIterator<string|int, TValue> -
          -
          Retrieve an external iterator.
          - -
          - - - - - - - - -
          -

          - Methods - - -

          -
          -

          - getIterator() - - -

          - - -

          Retrieve an external iterator.

          - - - public - getIterator() : ArrayIterator<string|int, TValue> - -
          -
          APIYes
          - -
          - - - - -
          -
          Return values
          - ArrayIterator<string|int, TValue> - — -

          New iterator for the data array

          -
          - -
          - -
          -
          - -
          -
          -
          -
          -
          
          -        
          - -
          -
          - - - -
          -
          -
          - -
          - On this page - - -
          - -
          -
          -
          -
          -
          -

          Search results

          - -
          -
          -
            -
            -
            -
            -
            - - -
            - - - - - - - - diff --git a/doc/classes/OCC-Basics-InterfaceTraits-IteratorTrait.html b/doc/classes/OCC-Basics-InterfaceTraits-IteratorTrait.html deleted file mode 100644 index e16e59d..0000000 --- a/doc/classes/OCC-Basics-InterfaceTraits-IteratorTrait.html +++ /dev/null @@ -1,658 +0,0 @@ - - - - - PHP Basics - - - - - - - - - - - - - - - - - - - - - -
            -

            PHP Basics

            - - - - - - -
            - -
            -
            - - - - -
            -
            - - -
            -

            - IteratorTrait -

            - - - -

            A generic implementation of the Iterator interface.

            - -

            Internally it iterates over the protected $_data array.

            -
            - - -
            - Tags - - -
            -
            -
            - author -
            -
            - -

            Sebastian Meyer sebastian.meyer@opencultureconsulting.com

            -
            - -
            -
            - template -
            -
            - -

            TValue of mixed

            -
            - -
            -
            - - - -

            - Table of Contents - - -

            - - - - - - - - - - -

            - Methods - - -

            -
            -
            - current() - -  : TValue|null -
            -
            Return the current item.
            - -
            - key() - -  : string|int|null -
            -
            Return the current key.
            - -
            - next() - -  : void -
            -
            Move forward to next item.
            - -
            - prev() - -  : void -
            -
            Move back to previous item.
            - -
            - rewind() - -  : void -
            -
            Rewind the iterator to the first item.
            - -
            - valid() - -  : bool -
            -
            Check if current position is valid.
            - -
            - - - - - - - - -
            -

            - Methods - - -

            -
            -

            - current() - - -

            - - -

            Return the current item.

            - - - public - current() : TValue|null - -
            -
            APIYes
            - -
            - - - - -
            -
            Return values
            - TValue|null - — -

            The current item or NULL if invalid

            -
            - -
            - -
            -
            -

            - key() - - -

            - - -

            Return the current key.

            - - - public - key() : string|int|null - -
            -
            APIYes
            - -
            - - - - -
            -
            Return values
            - string|int|null - — -

            The current key or NULL if invalid

            -
            - -
            - -
            -
            -

            - next() - - -

            - - -

            Move forward to next item.

            - - - public - next() : void - -
            -
            APIYes
            - -
            - - - - - -
            -
            -

            - prev() - - -

            - - -

            Move back to previous item.

            - - - public - prev() : void - -
            -
            APIYes
            - -
            - - - - - -
            -
            -

            - rewind() - - -

            - - -

            Rewind the iterator to the first item.

            - - - public - rewind() : void - -
            -
            APIYes
            - -
            - - - - - -
            -
            -

            - valid() - - -

            - - -

            Check if current position is valid.

            - - - public - valid() : bool - -
            -
            APIYes
            - -
            - - - - -
            -
            Return values
            - bool - — -

            Whether the current position is valid

            -
            - -
            - -
            -
            - -
            -
            -
            -
            -
            
            -        
            - -
            -
            - - - -
            -
            -
            - -
            - On this page - - -
            - -
            -
            -
            -
            -
            -

            Search results

            - -
            -
            -
              -
              -
              -
              -
              - - -
              - - - - - - - - diff --git a/doc/files/src-datastructures-collection.html b/doc/files/src-datastructures-collection.html deleted file mode 100644 index 9a5efc8..0000000 --- a/doc/files/src-datastructures-collection.html +++ /dev/null @@ -1,332 +0,0 @@ - - - - - PHP Basics - - - - - - - - - - - - - - - - - - - - - -
              -

              PHP Basics

              - - - - - - -
              - -
              -
              - - - - -
              -
              -
                -
              - -
              -

              Collection.php

              - -

              PHP Basics

              - -

              Copyright (C) 2024 Sebastian Meyer sebastian.meyer@opencultureconsulting.com

              -

              This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version.

              -

              This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details.

              -

              You should have received a copy of the GNU General Public License -along with this program. If not, see http://www.gnu.org/licenses/.

              -
              - - - - - -

              - Table of Contents - - -

              - - - - -

              - Classes - - -

              -
              -
              Collection
              A generic collection of items.
              - - - - - - - - - - - - - -
              -
              -
              -
              -
              
              -        
              - -
              -
              - - - -
              -
              -
              - -
              - On this page - -
                -
              • Table Of Contents
              • -
              • - -
              • - - -
              -
              - -
              -
              -
              -
              -
              -

              Search results

              - -
              -
              -
                -
                -
                -
                -
                - - -
                - - - - - - - - diff --git a/doc/files/src-datastructures-strictspldatastructuretrait.html b/doc/files/src-datastructures-strictspldatastructuretrait.html deleted file mode 100644 index 0fe48df..0000000 --- a/doc/files/src-datastructures-strictspldatastructuretrait.html +++ /dev/null @@ -1,362 +0,0 @@ - - - - - PHP Basics - - - - - - - - - - - - - - - - - - - - - -
                -

                PHP Basics

                - - - - - - -
                - -
                -
                - - - - -
                -
                -
                  -
                - -
                -

                StrictSplDatastructureTrait.php

                - -

                PHP Basics

                - -

                Copyright (C) 2024 Sebastian Meyer sebastian.meyer@opencultureconsulting.com

                -

                This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version.

                -

                This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details.

                -

                You should have received a copy of the GNU General Public License -along with this program. If not, see http://www.gnu.org/licenses/.

                -
                - - - - - -

                - Table of Contents - - -

                - - - - - -

                - Traits - - -

                -
                -
                StrictSplDatastructureTrait
                The common interface of all type-sensitive, SPL-based datastructures.
                - - - - - - - - - - - - -
                -
                -
                -
                -
                
                -        
                - -
                -
                - - - -
                -
                -
                - -
                - On this page - -
                  -
                • Table Of Contents
                • -
                • - -
                • - - -
                -
                - -
                -
                -
                -
                -
                -

                Search results

                - -
                -
                -
                  -
                  -
                  -
                  -
                  - - -
                  - - - - - - - - diff --git a/doc/files/src-datastructures-traits-strictspldatastructuretrait.html b/doc/files/src-datastructures-traits-strictspldoublylinkedlisttrait.html similarity index 93% rename from doc/files/src-datastructures-traits-strictspldatastructuretrait.html rename to doc/files/src-datastructures-traits-strictspldoublylinkedlisttrait.html index 7169048..0e47876 100644 --- a/doc/files/src-datastructures-traits-strictspldatastructuretrait.html +++ b/doc/files/src-datastructures-traits-strictspldoublylinkedlisttrait.html @@ -172,7 +172,7 @@

                  Fil

                  @@ -226,7 +226,7 @@

                  -
                  
                  +            
                  
                           
                  @@ -325,7 +325,7 @@

                • Table Of Contents
                • @@ -347,7 +347,7 @@

                  Search results

                  - + diff --git a/doc/files/src-interfacetraits-arrayaccesstrait.html b/doc/files/src-interfacetraits-arrayaccesstrait.html deleted file mode 100644 index 2e47999..0000000 --- a/doc/files/src-interfacetraits-arrayaccesstrait.html +++ /dev/null @@ -1,336 +0,0 @@ - - - - - PHP Basics - - - - - - - - - - - - - - - - - - - - - -
                  -

                  PHP Basics

                  - - - - - - -
                  - -
                  -
                  - - - - -
                  -
                  -
                    -
                  - -
                  -

                  ArrayAccessTrait.php

                  - -

                  PHP Basics

                  - -

                  Copyright (C) 2024 Sebastian Meyer sebastian.meyer@opencultureconsulting.com

                  -

                  This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version.

                  -

                  This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details.

                  -

                  You should have received a copy of the GNU General Public License -along with this program. If not, see http://www.gnu.org/licenses/.

                  -
                  - - - - - -

                  - Table of Contents - - -

                  - - - - - -

                  - Traits - - -

                  -
                  -
                  ArrayAccessTrait
                  A generic implementation of the ArrayAccess interface.
                  - - - - - - - - - - - - -
                  -
                  -
                  -
                  -
                  
                  -        
                  - -
                  -
                  - - - -
                  -
                  -
                  - -
                  - On this page - -
                    -
                  • Table Of Contents
                  • -
                  • - -
                  • - - -
                  -
                  - -
                  -
                  -
                  -
                  -
                  -

                  Search results

                  - -
                  -
                  -
                    -
                    -
                    -
                    -
                    - - -
                    - - - - - - - - diff --git a/doc/files/src-interfacetraits-countabletrait.html b/doc/files/src-interfacetraits-countabletrait.html deleted file mode 100644 index bc52c75..0000000 --- a/doc/files/src-interfacetraits-countabletrait.html +++ /dev/null @@ -1,336 +0,0 @@ - - - - - PHP Basics - - - - - - - - - - - - - - - - - - - - - -
                    -

                    PHP Basics

                    - - - - - - -
                    - -
                    -
                    - - - - -
                    -
                    -
                      -
                    - -
                    -

                    CountableTrait.php

                    - -

                    PHP Basics

                    - -

                    Copyright (C) 2024 Sebastian Meyer sebastian.meyer@opencultureconsulting.com

                    -

                    This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version.

                    -

                    This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details.

                    -

                    You should have received a copy of the GNU General Public License -along with this program. If not, see http://www.gnu.org/licenses/.

                    -
                    - - - - - -

                    - Table of Contents - - -

                    - - - - - -

                    - Traits - - -

                    -
                    -
                    CountableTrait
                    A generic implementation of the Countable interface.
                    - - - - - - - - - - - - -
                    -
                    -
                    -
                    -
                    
                    -        
                    - -
                    -
                    - - - -
                    -
                    -
                    - -
                    - On this page - -
                      -
                    • Table Of Contents
                    • -
                    • - -
                    • - - -
                    -
                    - -
                    -
                    -
                    -
                    -
                    -

                    Search results

                    - -
                    -
                    -
                      -
                      -
                      -
                      -
                      - - -
                      - - - - - - - - diff --git a/doc/files/src-interfacetraits-iteratoraggregatetrait.html b/doc/files/src-interfacetraits-iteratoraggregatetrait.html deleted file mode 100644 index 8cd4894..0000000 --- a/doc/files/src-interfacetraits-iteratoraggregatetrait.html +++ /dev/null @@ -1,336 +0,0 @@ - - - - - PHP Basics - - - - - - - - - - - - - - - - - - - - - -
                      -

                      PHP Basics

                      - - - - - - -
                      - -
                      -
                      - - - - -
                      -
                      -
                        -
                      - -
                      -

                      IteratorAggregateTrait.php

                      - -

                      PHP Basics

                      - -

                      Copyright (C) 2024 Sebastian Meyer sebastian.meyer@opencultureconsulting.com

                      -

                      This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version.

                      -

                      This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details.

                      -

                      You should have received a copy of the GNU General Public License -along with this program. If not, see http://www.gnu.org/licenses/.

                      -
                      - - - - - -

                      - Table of Contents - - -

                      - - - - - -

                      - Traits - - -

                      -
                      -
                      IteratorAggregateTrait
                      A generic implementation of the IteratorAggregate interface.
                      - - - - - - - - - - - - -
                      -
                      -
                      -
                      -
                      
                      -        
                      - -
                      -
                      - - - -
                      -
                      -
                      - -
                      - On this page - -
                        -
                      • Table Of Contents
                      • -
                      • - -
                      • - - -
                      -
                      - -
                      -
                      -
                      -
                      -
                      -

                      Search results

                      - -
                      -
                      -
                        -
                        -
                        -
                        -
                        - - -
                        - - - - - - - - diff --git a/doc/files/src-interfacetraits-iteratortrait.html b/doc/files/src-interfacetraits-iteratortrait.html deleted file mode 100644 index 621cf0b..0000000 --- a/doc/files/src-interfacetraits-iteratortrait.html +++ /dev/null @@ -1,336 +0,0 @@ - - - - - PHP Basics - - - - - - - - - - - - - - - - - - - - - -
                        -

                        PHP Basics

                        - - - - - - -
                        - -
                        -
                        - - - - -
                        -
                        -
                          -
                        - -
                        -

                        IteratorTrait.php

                        - -

                        PHP Basics

                        - -

                        Copyright (C) 2024 Sebastian Meyer sebastian.meyer@opencultureconsulting.com

                        -

                        This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version.

                        -

                        This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details.

                        -

                        You should have received a copy of the GNU General Public License -along with this program. If not, see http://www.gnu.org/licenses/.

                        -
                        - - - - - -

                        - Table of Contents - - -

                        - - - - - -

                        - Traits - - -

                        -
                        -
                        IteratorTrait
                        A generic implementation of the Iterator interface.
                        - - - - - - - - - - - - -
                        -
                        -
                        -
                        -
                        
                        -        
                        - -
                        -
                        - - - -
                        -
                        -
                        - -
                        - On this page - -
                          -
                        • Table Of Contents
                        • -
                        • - -
                        • - - -
                        -
                        - -
                        -
                        -
                        -
                        -
                        -

                        Search results

                        - -
                        -
                        -
                          -
                          -
                          -
                          -
                          - - -
                          - - - - - - - - diff --git a/doc/files/src/DataStructures/Collection.php.txt b/doc/files/src/DataStructures/Collection.php.txt deleted file mode 100644 index 7d95fd9..0000000 --- a/doc/files/src/DataStructures/Collection.php.txt +++ /dev/null @@ -1,195 +0,0 @@ - - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -declare(strict_types=1); - -namespace OCC\Basics\DataStructures; - -use ArrayAccess; -use Countable; -use IteratorAggregate; -use OCC\Basics\InterfaceTraits\ArrayAccessTrait; -use OCC\Basics\InterfaceTraits\CountableTrait; -use OCC\Basics\InterfaceTraits\IteratorAggregateTrait; - -/** - * A generic collection of items. - * - * @author Sebastian Meyer - * @package Basics\DataStructures - * - * @api - * - * @template Item of mixed - * @implements ArrayAccess - * @implements IteratorAggregate - */ -class Collection implements ArrayAccess, Countable, IteratorAggregate -{ - /** @use ArrayAccessTrait */ - use ArrayAccessTrait; - /** @use CountableTrait */ - use CountableTrait; - /** @use IteratorAggregateTrait */ - use IteratorAggregateTrait; - - /** - * Add an item to the collection. - * - * @param Item $item The new item - * - * @return void - * - * @api - */ - public function add(mixed $item): void - { - $this->data[] = $item; - } - - /** - * Clear the collection of any items. - * - * @return void - * - * @api - */ - public function clear(): void - { - $this->data = []; - } - - /** - * Get a new collection with the same set of items. - * - * @return Collection The new collection with the same items - * - * @api - */ - public function copy(): Collection - { - return new Collection($this->data); - } - - /** - * Get the item at the specified index. - * - * @param array-key $key The item's index - * - * @return ?Item The item or NULL if key is invalid - * - * @api - */ - public function get(int|string $key): mixed - { - return $this->data[$key] ?? null; - } - - /** - * Check if collection is empty. - * - * @return bool Whether the collection contains any items - * - * @api - */ - public function isEmpty(): bool - { - return $this->count() === 0; - } - - /** - * Remove an item from the collection. - * - * @param array-key $key The item's key - * - * @return void - * - * @api - */ - public function remove(int|string $key): void - { - unset($this->data[$key]); - } - - /** - * Set the item at the specified index. - * - * @param array-key $key The new item's index - * @param Item $item The new item - * - * @return void - * - * @api - */ - public function set(int|string $key, mixed $item): void - { - $this->data[$key] = $item; - } - - /** - * Return array representation of collection. - * - * @return array Array of collection items - * - * @api - */ - public function toArray(): array - { - return $this->data; - } - - /** - * Create a collection of items. - * - * @param array $items Initial set of items - * - * @return void - */ - public function __construct(array $items = []) - { - $this->data = $items; - } - - /** - * Magic method to read collection items as properties. - * - * @param array-key $key The item's index - * - * @return ?Item The item or NULL if key is invalid - */ - public function __get(int|string $key): mixed - { - return $this->get($key); - } - - /** - * Magic method to write collection items as properties. - * - * @param array-key $key The new item's index - * @param Item $item The new item - * - * @return void - */ - public function __set(int|string $key, mixed $item): void - { - $this->set($key, $item); - } -} diff --git a/doc/files/src/DataStructures/StrictArray.php.txt b/doc/files/src/DataStructures/StrictArray.php.txt index afb74da..bd590ea 100644 --- a/doc/files/src/DataStructures/StrictArray.php.txt +++ b/doc/files/src/DataStructures/StrictArray.php.txt @@ -24,7 +24,9 @@ declare(strict_types=1); namespace OCC\Basics\DataStructures; use Iterator; +use OCC\Basics\DataStructures\Exceptions\InvalidDataTypeException; use OCC\Basics\Interfaces\IteratorTrait; +use RuntimeException; /** * A type-sensitive, traversable array. @@ -49,4 +51,130 @@ class StrictArray extends StrictCollection implements Iterator { /** @use IteratorTrait */ use IteratorTrait; + + /** + * Peek at the first item of the array. + * + * @return AllowedType The first item of the array + * + * @throws RuntimeException if the array is empty + * + * @api + */ + public function bottom(): mixed + { + $key = array_key_first($this->_data); + if (is_null($key)) { + throw new RuntimeException( + 'Cannot return bottom item: array is empty.' + ); + } + return $this->_data[$key]; + } + + /** + * Pop the item from the end of the array. + * + * @return AllowedType The last item of the array + * + * @throws RuntimeException if the array is empty + * + * @api + */ + public function pop(): mixed + { + if ($this->count() === 0) { + throw new RuntimeException( + 'Cannot return last item: array is empty.' + ); + } + return array_pop($this->_data); + } + + /** + * Push an item at the end of the array. + * + * @param AllowedType $value The item to push + * + * @return void + * + * @throws InvalidDataTypeException if `$value` is not of allowed type + * + * @api + */ + public function push(mixed $value): void + { + if (!$this->hasAllowedType($value)) { + throw new InvalidDataTypeException( + sprintf( + 'Parameter 1 must be an allowed type, %s given.', + get_debug_type($value) + ) + ); + } + array_push($this->_data, $value); + } + + /** + * Shift the item from the beginning of the array. + * + * @return AllowedType The first item of the array + * + * @throws RuntimeException if the array is empty + * + * @api + */ + public function shift(): mixed + { + if ($this->count() === 0) { + throw new RuntimeException( + 'Cannot return first item: array is empty.' + ); + } + return array_shift($this->_data); + } + + /** + * Peek at the last item of the array. + * + * @return AllowedType The last item of the array + * + * @throws RuntimeException if the array is empty + * + * @api + */ + public function top(): mixed + { + $key = array_key_last($this->_data); + if (is_null($key)) { + throw new RuntimeException( + 'Cannot return top item: array is empty.' + ); + } + return $this->_data[$key]; + } + + /** + * Prepend the array with an item. + * + * @param AllowedType $value The item to unshift + * + * @return void + * + * @throws InvalidDataTypeException if `$value` is not of allowed type + * + * @api + */ + public function unshift(mixed $value): void + { + if (!$this->hasAllowedType($value)) { + throw new InvalidDataTypeException( + sprintf( + 'Parameter 1 must be an allowed type, %s given.', + get_debug_type($value) + ) + ); + } + array_unshift($this->_data, $value); + } } diff --git a/doc/files/src/DataStructures/StrictList.php.txt b/doc/files/src/DataStructures/StrictList.php.txt index be8f407..737b92f 100644 --- a/doc/files/src/DataStructures/StrictList.php.txt +++ b/doc/files/src/DataStructures/StrictList.php.txt @@ -23,7 +23,7 @@ declare(strict_types=1); namespace OCC\Basics\DataStructures; -use OCC\Basics\DataStructures\Traits\StrictSplDatastructureTrait; +use OCC\Basics\DataStructures\Traits\StrictSplDoublyLinkedListTrait; use SplDoublyLinkedList; /** @@ -43,6 +43,6 @@ use SplDoublyLinkedList; */ class StrictList extends SplDoublyLinkedList { - /** @use StrictSplDatastructureTrait */ - use StrictSplDatastructureTrait; + /** @use StrictSplDoublyLinkedListTrait */ + use StrictSplDoublyLinkedListTrait; } diff --git a/doc/files/src/DataStructures/StrictQueue.php.txt b/doc/files/src/DataStructures/StrictQueue.php.txt index 266fa7c..caa9cb4 100644 --- a/doc/files/src/DataStructures/StrictQueue.php.txt +++ b/doc/files/src/DataStructures/StrictQueue.php.txt @@ -24,7 +24,8 @@ declare(strict_types=1); namespace OCC\Basics\DataStructures; use OCC\Basics\DataStructures\Exceptions\InvalidDataTypeException; -use OCC\Basics\DataStructures\Traits\StrictSplDatastructureTrait; +use OCC\Basics\DataStructures\Traits\StrictSplDoublyLinkedListTrait; +use RuntimeException; use SplQueue; /** @@ -44,8 +45,22 @@ use SplQueue; */ class StrictQueue extends SplQueue { - /** @use StrictSplDatastructureTrait */ - use StrictSplDatastructureTrait; + /** @use StrictSplDoublyLinkedListTrait */ + use StrictSplDoublyLinkedListTrait; + + /** + * Dequeue an item from the queue. + * + * @return AllowedType The dequeued item + * + * @throws RuntimeException if the queue is empty + * + * @api + */ + public function dequeue(): mixed + { + return $this->shift(); + } /** * Add an item to the queue. diff --git a/doc/files/src/DataStructures/StrictSplDatastructureTrait.php.txt b/doc/files/src/DataStructures/StrictSplDatastructureTrait.php.txt deleted file mode 100644 index 8608abc..0000000 --- a/doc/files/src/DataStructures/StrictSplDatastructureTrait.php.txt +++ /dev/null @@ -1,420 +0,0 @@ - - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -declare(strict_types=1); - -namespace OCC\Basics\DataStructures; - -use InvalidArgumentException; -use OCC\Basics\Traits\TypeChecker; -use OutOfRangeException; - -use function get_debug_type; -use function iterator_to_array; -use function serialize; -use function sprintf; -use function unserialize; - -/** - * The common interface of all type-sensitive, SPL-based datastructures. - * - * This extends all methods of the common interface of the Standard PHP Library - * [Doubly Linked List Datastructures](https://www.php.net/spl.datastructures) - * by type-checking to only allow specified data types on the list. - * - * @author Sebastian Meyer - * @package Basics\DataStructures - * - * @template AllowedType of mixed - */ -trait StrictSplDatastructureTrait -{ - use TypeChecker { - setAllowedTypes as protected; - } - - /** - * Add/insert a new item at the specified offset. - * - * @param int $offset The offset where the new item is to be inserted - * @param AllowedType $value The new item for the offset - * - * @return void - * - * @throws InvalidArgumentException if `$value` is not of allowed type - * @throws OutOfRangeException when `$offset` is out of bounds - * - * @api - */ - public function add(int $offset, mixed $value): void - { - $this->offsetSet($offset, $value); - } - - /** - * Append items at the end of the list. - * - * @param AllowedType ...$values One or more items to append - * - * @return void - * - * @throws InvalidArgumentException if any `$values` is not of allowed type - * - * @api - */ - public function append(mixed ...$values): void - { - /** @var array $values */ - foreach ($values as $count => $value) { - if (!$this->hasAllowedType($value)) { - throw new InvalidArgumentException( - sprintf( - 'Parameter %d must be an allowed type, %s given.', - $count + 1, - get_debug_type($value) - ) - ); - } - } - foreach ($values as $value) { - parent::push($value); - } - } - - /** - * Clear the list of any items. - * - * @return void - * - * @api - */ - public function clear(): void - { - while (!$this->isEmpty()) { - $this->pop(); - } - $this->rewind(); - } - - /** - * Get the item at the specified index. - * - * @param int $offset The item's index - * - * @return AllowedType The item - * - * @throws OutOfRangeException when `$offset` is out of bounds - * - * @api - */ - public function get(int $offset): mixed - { - return $this->offsetGet($offset); - } - - /** - * Check if this can be considered a list. - * - * @return true Always TRUE (this exists only for compatibility reasons) - * - * @api - */ - public function isList(): bool - { - return true; - } - - /** - * Set the item at the specified offset. - * - * @param ?int $offset The offset being set or NULL to append - * @param AllowedType $value The new item for the offset - * - * @return void - * - * @throws InvalidArgumentException if `$value` is not of allowed type - * @throws OutOfRangeException when `$offset` is out of bounds - * - * @api - */ - public function offsetSet(mixed $offset, mixed $value): void - { - if (!$this->hasAllowedType($value)) { - throw new InvalidArgumentException( - sprintf( - 'Parameter 2 must be an allowed type, %s given.', - get_debug_type($value) - ) - ); - } - /** @psalm-suppress PossiblyNullArgument */ - parent::offsetSet($offset, $value); - } - - /** - * Prepend items at the start of the list. - * - * @param AllowedType ...$values One or more items to prepend - * - * @return void - * - * @throws InvalidArgumentException if `$value` is not of allowed type - * - * @api - */ - public function prepend(mixed ...$values): void - { - /** @var array $values */ - foreach ($values as $count => $value) { - if (!$this->hasAllowedType($value)) { - throw new InvalidArgumentException( - sprintf( - 'Parameter %d must be an allowed type, %s given.', - $count + 1, - get_debug_type($value) - ) - ); - } - } - foreach ($values as $value) { - parent::unshift($value); - } - } - - /** - * Push an item at the end of the list. - * - * @param AllowedType $value The item to push - * - * @return void - * - * @throws InvalidArgumentException if `$value` is not of allowed type - * - * @api - */ - public function push(mixed $value): void - { - if (!$this->hasAllowedType($value)) { - throw new InvalidArgumentException( - sprintf( - 'Parameter 1 must be an allowed type, %s given.', - get_debug_type($value) - ) - ); - } - parent::push($value); - } - - /** - * Remove an item from the list. - * - * @param int $offset The item's index - * - * @return void - * - * @throws OutOfRangeException when `$offset` is out of bounds - * - * @api - */ - public function remove(int $offset): void - { - $this->offsetUnset($offset); - } - - /** - * Get string representation of $this. - * - * @return string The string representation - * - * @internal - */ - public function serialize(): string - { - return serialize($this->__serialize()); - } - - /** - * Set an item at the specified index. - * - * @param int $offset The item's index - * @param AllowedType $value The item - * - * @return void - * - * @throws InvalidArgumentException if `$value` is not of allowed type - * - * @api - */ - public function set(int $offset, mixed $value): void - { - $this->offsetSet($offset, $value); - } - - /** - * Return array representation of list. - * - * @return array Array of list items - * - * @api - */ - public function toArray(): array - { - return iterator_to_array($this, true); - } - - /** - * Turn list into a type-sensitive collection. - * - * @return StrictCollection A type-sensitive collection of the list's items - * - * @api - */ - public function toStrictCollection(): StrictCollection - { - $strictCollection = new StrictCollection($this->getAllowedTypes()); - foreach ($this->toArray() as $offset => $value) { - $strictCollection[$offset] = $value; - } - return $strictCollection; - } - - /** - * Restore $this from string representation. - * - * @param string $data The string representation - * - * @return void - * - * @internal - */ - public function unserialize($data): void - { - /** @var mixed[] $dataArray */ - $dataArray = unserialize($data); - $this->__unserialize($dataArray); - } - - /** - * Prepend the list with an item. - * - * @param AllowedType $value The item to unshift - * - * @return void - * - * @throws InvalidArgumentException if `$value` is not of allowed type - * - * @api - */ - public function unshift(mixed $value): void - { - if (!$this->hasAllowedType($value)) { - throw new InvalidArgumentException( - sprintf( - 'Parameter 1 must be an allowed type, %s given.', - get_debug_type($value) - ) - ); - } - parent::unshift($value); - } - - /** - * Create a type-sensitive, traversable list of items. - * - * @param string[] $allowedTypes Allowed data types of items (optional) - * - * If empty, all types are allowed. - * Possible values are: - * - "array" - * - "bool" - * - "callable" - * - "countable" - * - "float" or "double" - * - "int" or "integer" or "long" - * - "iterable" - * - "null" - * - "numeric" - * - "object" or FQCN - * - "resource" - * - "scalar" - * - "string" - * - * @return void - * - * @throws InvalidArgumentException if any value of `$allowedTypes` is not a string - */ - public function __construct(array $allowedTypes = []) - { - $this->setAllowedTypes($allowedTypes); - } - - /** - * Get debug information for $this. - * - * @return mixed[] The debug information - * - * @internal - */ - public function __debugInfo(): array - { - return $this->__serialize(); - } - - /** - * Get array representation of $this. - * - * @return mixed[] The array representation - * - * @internal - */ - public function __serialize(): array - { - return [ - 'StrictSplDatastructure::allowedTypes' => $this->getAllowedTypes(), - 'StrictSplDatastructure::dllist' => $this->toArray(), - 'StrictSplDatastructure::flags' => $this->getIteratorMode() - ]; - } - - /** - * Restore $this from array representation. - * - * @param mixed[] $data The array representation - * - * @return void - * - * @internal - * - * @psalm-suppress MethodSignatureMismatch - */ - public function __unserialize(array $data): void - { - /** @var string[] $allowedTypes */ - $allowedTypes = $data['StrictSplDatastructure::allowedTypes']; - $this->setAllowedTypes($allowedTypes); - /** @var array $values */ - $values = $data['StrictSplDatastructure::dllist']; - $this->append(...$values); - /** @var int $flags */ - $flags = $data['StrictSplDatastructure::flags']; - $this->setIteratorMode($flags); - } -} diff --git a/doc/files/src/DataStructures/StrictStack.php.txt b/doc/files/src/DataStructures/StrictStack.php.txt index 8ec5cda..6c82907 100644 --- a/doc/files/src/DataStructures/StrictStack.php.txt +++ b/doc/files/src/DataStructures/StrictStack.php.txt @@ -24,7 +24,7 @@ declare(strict_types=1); namespace OCC\Basics\DataStructures; use OCC\Basics\DataStructures\Exceptions\InvalidDataTypeException; -use OCC\Basics\DataStructures\Traits\StrictSplDatastructureTrait; +use OCC\Basics\DataStructures\Traits\StrictSplDoublyLinkedListTrait; use RuntimeException; use SplStack; @@ -45,8 +45,8 @@ use SplStack; */ class StrictStack extends SplStack { - /** @use StrictSplDatastructureTrait */ - use StrictSplDatastructureTrait; + /** @use StrictSplDoublyLinkedListTrait */ + use StrictSplDoublyLinkedListTrait; /** * Add an item to the stack. @@ -69,7 +69,7 @@ class StrictStack extends SplStack * * @return AllowedType The unstacked item * - * @throws RuntimeException if the list is empty + * @throws RuntimeException if the stack is empty * * @api */ diff --git a/doc/files/src/DataStructures/Traits/StrictSplDatastructureTrait.php.txt b/doc/files/src/DataStructures/Traits/StrictSplDoublyLinkedListTrait.php.txt similarity index 99% rename from doc/files/src/DataStructures/Traits/StrictSplDatastructureTrait.php.txt rename to doc/files/src/DataStructures/Traits/StrictSplDoublyLinkedListTrait.php.txt index 6eb421f..73f34d1 100644 --- a/doc/files/src/DataStructures/Traits/StrictSplDatastructureTrait.php.txt +++ b/doc/files/src/DataStructures/Traits/StrictSplDoublyLinkedListTrait.php.txt @@ -49,7 +49,7 @@ use function unserialize; * @template AllowedType of mixed * @phpstan-require-extends SplDoublyLinkedList */ -trait StrictSplDatastructureTrait +trait StrictSplDoublyLinkedListTrait { use TypeChecker { setAllowedTypes as protected; diff --git a/doc/files/src/ErrorHandlers/ThrowErrorException.php.txt b/doc/files/src/ErrorHandlers/ThrowErrorException.php.txt index f9ff9af..271b77b 100644 --- a/doc/files/src/ErrorHandlers/ThrowErrorException.php.txt +++ b/doc/files/src/ErrorHandlers/ThrowErrorException.php.txt @@ -52,8 +52,12 @@ class ThrowErrorException * * @throws ErrorException if `error_reporting` is set to report the error */ - public function __invoke(int $errno = E_USER_ERROR, string $errstr = '', ?string $errfile = null, ?int $errline = null): bool - { + public function __invoke( + int $errno = \E_USER_ERROR, + string $errstr = '', + ?string $errfile = null, + ?int $errline = null + ): bool { if ((error_reporting() & $errno) > 0) { throw new ErrorException($errstr, 0, $errno, $errfile, $errline); } diff --git a/doc/files/src/ErrorHandlers/TriggerExceptionError.php.txt b/doc/files/src/ErrorHandlers/TriggerExceptionError.php.txt index feddf1c..16e9527 100644 --- a/doc/files/src/ErrorHandlers/TriggerExceptionError.php.txt +++ b/doc/files/src/ErrorHandlers/TriggerExceptionError.php.txt @@ -57,6 +57,6 @@ class TriggerExceptionError $exception->getLine(), $exception->getMessage() ); - trigger_error($message, E_USER_ERROR); + trigger_error($message, \E_USER_ERROR); } } diff --git a/doc/files/src/InterfaceTraits/ArrayAccessTrait.php.txt b/doc/files/src/InterfaceTraits/ArrayAccessTrait.php.txt deleted file mode 100644 index 1b99e2c..0000000 --- a/doc/files/src/InterfaceTraits/ArrayAccessTrait.php.txt +++ /dev/null @@ -1,113 +0,0 @@ - - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -declare(strict_types=1); - -namespace OCC\Basics\InterfaceTraits; - -use ArrayAccess; - -/** - * A generic implementation of the ArrayAccess interface. - * - * Internally it accesses the protected `$_data` array. - * - * @author Sebastian Meyer - * @package Basics\InterfaceTraits - * - * @api - * - * @template TValue of mixed - * @implements ArrayAccess - * @phpstan-require-implements ArrayAccess - */ -trait ArrayAccessTrait -{ - /** - * Holds the array-accessible data. - * - * @var TValue[] - * - * @internal - */ - protected array $_data = []; - - /** - * Check if the specified offset exists. - * - * @param array-key $offset The offset to check for - * - * @return bool Whether the offset exists - * - * @api - */ - public function offsetExists(mixed $offset): bool - { - return isset($this->_data[$offset]); - } - - /** - * Retrieve data at the specified offset. - * - * @param array-key $offset The offset to retrieve - * - * @return ?TValue The value at the offset or NULL if invalid - * - * @api - */ - public function offsetGet(mixed $offset): mixed - { - return $this->_data[$offset] ?? null; - } - - /** - * Assign a value to the specified offset. - * - * @param ?array-key $offset The offset to assign to or NULL to append - * @param TValue $value The value to set - * - * @return void - * - * @api - */ - public function offsetSet(mixed $offset, mixed $value): void - { - if (is_null($offset)) { - $this->_data[] = $value; - } else { - $this->_data[$offset] = $value; - } - } - - /** - * Unset the specified offset. - * - * @param array-key $offset The offset to unset - * - * @return void - * - * @api - */ - public function offsetUnset(mixed $offset): void - { - unset($this->_data[$offset]); - } -} diff --git a/doc/files/src/InterfaceTraits/CountableTrait.php.txt b/doc/files/src/InterfaceTraits/CountableTrait.php.txt deleted file mode 100644 index 3c231cc..0000000 --- a/doc/files/src/InterfaceTraits/CountableTrait.php.txt +++ /dev/null @@ -1,64 +0,0 @@ - - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -declare(strict_types=1); - -namespace OCC\Basics\InterfaceTraits; - -use Countable; - -/** - * A generic implementation of the Countable interface. - * - * Internally it counts the values of the protected `$_data` array. - * - * @author Sebastian Meyer - * @package Basics\InterfaceTraits - * - * @api - * - * @template TValue of mixed - * @implements Countable - * @phpstan-require-implements Countable - */ -trait CountableTrait -{ - /** - * Holds the countable data. - * - * @var TValue[] - * - * @internal - */ - protected array $_data = []; - - /** - * Count the data items. - * - * @return int<0, max> The number of data items - * - * @api - */ - public function count(): int - { - return count($this->_data); - } -} diff --git a/doc/files/src/InterfaceTraits/IteratorAggregateTrait.php.txt b/doc/files/src/InterfaceTraits/IteratorAggregateTrait.php.txt deleted file mode 100644 index 934fffe..0000000 --- a/doc/files/src/InterfaceTraits/IteratorAggregateTrait.php.txt +++ /dev/null @@ -1,65 +0,0 @@ - - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -declare(strict_types=1); - -namespace OCC\Basics\InterfaceTraits; - -use ArrayIterator; -use IteratorAggregate; - -/** - * A generic implementation of the IteratorAggregate interface. - * - * Internally it iterates over the protected `$_data` array. - * - * @author Sebastian Meyer - * @package Basics\InterfaceTraits - * - * @api - * - * @template TValue of mixed - * @implements IteratorAggregate - * @phpstan-require-implements IteratorAggregate - */ -trait IteratorAggregateTrait -{ - /** - * Holds the iterable data. - * - * @var TValue[] - * - * @internal - */ - protected array $_data = []; - - /** - * Retrieve an external iterator. - * - * @return ArrayIterator New iterator for the data array - * - * @api - */ - public function getIterator(): ArrayIterator - { - return new ArrayIterator($this->_data); - } -} diff --git a/doc/files/src/InterfaceTraits/IteratorTrait.php.txt b/doc/files/src/InterfaceTraits/IteratorTrait.php.txt deleted file mode 100644 index 576e165..0000000 --- a/doc/files/src/InterfaceTraits/IteratorTrait.php.txt +++ /dev/null @@ -1,128 +0,0 @@ - - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -declare(strict_types=1); - -namespace OCC\Basics\InterfaceTraits; - -use Iterator; - -/** - * A generic implementation of the Iterator interface. - * - * Internally it iterates over the protected `$_data` array. - * - * @author Sebastian Meyer - * @package Basics\InterfaceTraits - * - * @api - * - * @template TValue of mixed - * @implements Iterator - * @phpstan-require-implements Iterator - */ -trait IteratorTrait -{ - /** - * Holds the iterable data. - * - * @var TValue[] - * - * @internal - */ - protected array $_data = []; - - /** - * Return the current item. - * - * @return ?TValue The current item or NULL if invalid - * - * @api - */ - public function current(): mixed - { - if ($this->valid()) { - /** @var TValue */ - return current($this->_data); - } - return null; - } - - /** - * Return the current key. - * - * @return ?array-key The current key or NULL if invalid - * - * @api - */ - public function key(): mixed - { - return key($this->_data); - } - - /** - * Move forward to next item. - * - * @return void - * - * @api - */ - public function next(): void - { - next($this->_data); - } - - /** - * Move back to previous item. - * - * @return void - * - * @api - */ - public function prev(): void - { - prev($this->_data); - } - - /** - * Rewind the iterator to the first item. - * - * @return void - * - * @api - */ - public function rewind(): void - { - reset($this->_data); - } - - /** - * Check if current position is valid. - * - * @return bool Whether the current position is valid - * - * @api - */ - public function valid(): bool - { - return !is_null($this->key()); - } -} diff --git a/doc/guides/changelog.html b/doc/guides/changelog.html index e08dfdc..a78e8de 100644 --- a/doc/guides/changelog.html +++ b/doc/guides/changelog.html @@ -173,10 +173,35 @@

                          Changelog

                          +
                          +

                          v2.1.0

                          + +

                          Breaking Changes:

                          + + + + +

                          New Features:

                          + + + + +
                          +

                          v2.0.0

                          @@ -226,7 +251,7 @@

                          v2.0.0

                        • Added new trait TypeChecker
                        • -
                        • Extended API for all datastructures (see StrictSplDatastructureTrait +
                        • Extended API for all datastructures (see )
                        • Introduced InvalidDataTypeException diff --git a/doc/guides/changelog/index.html b/doc/guides/changelog/index.html deleted file mode 100644 index ac12682..0000000 --- a/doc/guides/changelog/index.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - PHP Basics - - - - - - - - - - - - - - - - - - - - - - -
                          -

                          PHP Basics

                          - - - - - - -
                          - -
                          -
                          - - - - -
                          -
                          -

                          Changelog

                          - -
                          - -
                          - -
                          - -
                          -
                          -
                          -
                          -

                          Search results

                          - -
                          -
                          -
                            -
                            -
                            -
                            -
                            - - -
                            - - - - - - - - diff --git a/doc/guides/changelog/v1.0.0.html b/doc/guides/changelog/v1.0.0.html deleted file mode 100644 index fa4917f..0000000 --- a/doc/guides/changelog/v1.0.0.html +++ /dev/null @@ -1,194 +0,0 @@ - - - - - PHP Basics - - - - - - - - - - - - - - - - - - - - - - -
                            -

                            PHP Basics

                            - - - - - - -
                            - -
                            -
                            - - - - -
                            -
                            -

                            v1.0.0

                            - -

                            intial release

                            -
                            - -
                            -
                            -
                            -
                            -

                            Search results

                            - -
                            -
                            -
                              -
                              -
                              -
                              -
                              - - -
                              - - - - - - - - diff --git a/doc/guides/changelog/v1.0.1.html b/doc/guides/changelog/v1.0.1.html deleted file mode 100644 index bef2df5..0000000 --- a/doc/guides/changelog/v1.0.1.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - PHP Basics - - - - - - - - - - - - - - - - - - - - - - -
                              -

                              PHP Basics

                              - - - - - - -
                              - -
                              -
                              - - - - -
                              -
                              -

                              v1.0.1

                              - -

                              new: -- add exception handling to singleton trait

                              -
                              - -
                              -
                              -
                              -
                              -

                              Search results

                              - -
                              -
                              -
                                -
                                -
                                -
                                -
                                - - -
                                - - - - - - - - diff --git a/doc/guides/changelog/v1.1.0.html b/doc/guides/changelog/v1.1.0.html deleted file mode 100644 index 71c42ff..0000000 --- a/doc/guides/changelog/v1.1.0.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - PHP Basics - - - - - - - - - - - - - - - - - - - - - - -
                                -

                                PHP Basics

                                - - - - - - -
                                - -
                                -
                                - - - - -
                                -
                                -

                                v1.1.0

                                - -

                                breaking changes: -- removed first parameter (initial items) from constructor of data structures to improve compatibility with SplDoublyLinkedList

                                -
                                - -
                                -
                                -
                                -
                                -

                                Search results

                                - -
                                -
                                -
                                  -
                                  -
                                  -
                                  -
                                  - - -
                                  - - - - - - - - diff --git a/doc/guides/changelog/v2.0.0.html b/doc/guides/changelog/v2.0.0.html deleted file mode 100644 index 074ee3e..0000000 --- a/doc/guides/changelog/v2.0.0.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - - PHP Basics - - - - - - - - - - - - - - - - - - - - - - -
                                  -

                                  PHP Basics

                                  - - - - - - -
                                  - -
                                  -
                                  - - - - -
                                  -
                                  -

                                  v2.0.0

                                  - -

                                  breaking changes: -- requirements: php 8.0 -> php 8.1 -- namespace: InterfaceTraits -> Interfaces -- magic methods for getter and setter: magicGet.../magicSet... -> _magicGet.../_magicSet...

                                  -

                                  new: -- strictcollection -- triggererrorexception -- overloadinggetter -- overloadingsetter -- extended API for data structures -- extended documentation

                                  -
                                  - -
                                  -
                                  -
                                  -
                                  -

                                  Search results

                                  - -
                                  -
                                  -
                                    -
                                    -
                                    -
                                    -
                                    - - -
                                    - - - - - - - - diff --git a/doc/guides/cheatsheet.html b/doc/guides/cheatsheet.html deleted file mode 100644 index 8fe127d..0000000 --- a/doc/guides/cheatsheet.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - PHP Basics - - - - - - - - - - - - - - - - - - - - - - -
                                    -

                                    PHP Basics

                                    - - - - - - -
                                    - -
                                    -
                                    - - - - -
                                    -
                                    -

                                    Helpful Reminders

                                    - -
                                    -
                                    -

                                    Plain Box

                                    -
                                    -
                                    - -
                                    - -
                                    -

                                    Exclamation Mark

                                    -
                                    -
                                    - -
                                    - -
                                    -

                                    Lifebuoy

                                    -
                                    -
                                    - -
                                    - -
                                    -

                                    Speech Bubble

                                    -
                                    -
                                    - -
                                    // Code Block
                                    -
                                      -
                                      - -
                                      -
                                      -
                                      -
                                      -

                                      Search results

                                      - -
                                      -
                                      -
                                        -
                                        -
                                        -
                                        -
                                        - - -
                                        - - - - - - - - diff --git a/doc/guides/index.html b/doc/guides/index.html index a401e0d..f029ab7 100644 --- a/doc/guides/index.html +++ b/doc/guides/index.html @@ -192,6 +192,8 @@

                                        Documentation

                                      • Changelog

                                        T

                                        diff --git a/doc/js/searchIndex.js b/doc/js/searchIndex.js index ffe9537..51da4d5 100644 --- a/doc/js/searchIndex.js +++ b/doc/js/searchIndex.js @@ -10,6 +10,36 @@ Search.appendIndex( "name": "StrictArray", "summary": "A\u0020type\u002Dsensitive,\u0020traversable\u0020array.", "url": "classes/OCC-Basics-DataStructures-StrictArray.html" + }, { + "fqsen": "\\OCC\\Basics\\DataStructures\\StrictArray\u003A\u003Abottom\u0028\u0029", + "name": "bottom", + "summary": "Peek\u0020at\u0020the\u0020first\u0020item\u0020of\u0020the\u0020array.", + "url": "classes/OCC-Basics-DataStructures-StrictArray.html#method_bottom" + }, { + "fqsen": "\\OCC\\Basics\\DataStructures\\StrictArray\u003A\u003Apop\u0028\u0029", + "name": "pop", + "summary": "Pop\u0020the\u0020item\u0020from\u0020the\u0020end\u0020of\u0020the\u0020array.", + "url": "classes/OCC-Basics-DataStructures-StrictArray.html#method_pop" + }, { + "fqsen": "\\OCC\\Basics\\DataStructures\\StrictArray\u003A\u003Apush\u0028\u0029", + "name": "push", + "summary": "Push\u0020an\u0020item\u0020at\u0020the\u0020end\u0020of\u0020the\u0020array.", + "url": "classes/OCC-Basics-DataStructures-StrictArray.html#method_push" + }, { + "fqsen": "\\OCC\\Basics\\DataStructures\\StrictArray\u003A\u003Ashift\u0028\u0029", + "name": "shift", + "summary": "Shift\u0020the\u0020item\u0020from\u0020the\u0020beginning\u0020of\u0020the\u0020array.", + "url": "classes/OCC-Basics-DataStructures-StrictArray.html#method_shift" + }, { + "fqsen": "\\OCC\\Basics\\DataStructures\\StrictArray\u003A\u003Atop\u0028\u0029", + "name": "top", + "summary": "Peek\u0020at\u0020the\u0020last\u0020item\u0020of\u0020the\u0020array.", + "url": "classes/OCC-Basics-DataStructures-StrictArray.html#method_top" + }, { + "fqsen": "\\OCC\\Basics\\DataStructures\\StrictArray\u003A\u003Aunshift\u0028\u0029", + "name": "unshift", + "summary": "Prepend\u0020the\u0020array\u0020with\u0020an\u0020item.", + "url": "classes/OCC-Basics-DataStructures-StrictArray.html#method_unshift" }, { "fqsen": "\\OCC\\Basics\\DataStructures\\StrictCollection", "name": "StrictCollection", @@ -90,6 +120,11 @@ Search.appendIndex( "name": "StrictQueue", "summary": "A\u0020type\u002Dsensitive,\u0020taversable\u0020queue\u0020\u0028FIFO\u0029.", "url": "classes/OCC-Basics-DataStructures-StrictQueue.html" + }, { + "fqsen": "\\OCC\\Basics\\DataStructures\\StrictQueue\u003A\u003Adequeue\u0028\u0029", + "name": "dequeue", + "summary": "Dequeue\u0020an\u0020item\u0020from\u0020the\u0020queue.", + "url": "classes/OCC-Basics-DataStructures-StrictQueue.html#method_dequeue" }, { "fqsen": "\\OCC\\Basics\\DataStructures\\StrictQueue\u003A\u003Aenqueue\u0028\u0029", "name": "enqueue", @@ -111,80 +146,80 @@ Search.appendIndex( "summary": "Unstack\u0020an\u0020item\u0020from\u0020the\u0020stack.", "url": "classes/OCC-Basics-DataStructures-StrictStack.html#method_unstack" }, { - "fqsen": "\\OCC\\Basics\\DataStructures\\Traits\\StrictSplDatastructureTrait", - "name": "StrictSplDatastructureTrait", + "fqsen": "\\OCC\\Basics\\DataStructures\\Traits\\StrictSplDoublyLinkedListTrait", + "name": "StrictSplDoublyLinkedListTrait", "summary": "The\u0020common\u0020interface\u0020of\u0020all\u0020type\u002Dsensitive,\u0020SPL\u002Dbased\u0020datastructures.", - "url": "classes/OCC-Basics-DataStructures-Traits-StrictSplDatastructureTrait.html" + "url": "classes/OCC-Basics-DataStructures-Traits-StrictSplDoublyLinkedListTrait.html" }, { - "fqsen": "\\OCC\\Basics\\DataStructures\\Traits\\StrictSplDatastructureTrait\u003A\u003Aadd\u0028\u0029", + "fqsen": "\\OCC\\Basics\\DataStructures\\Traits\\StrictSplDoublyLinkedListTrait\u003A\u003Aadd\u0028\u0029", "name": "add", "summary": "Add\/insert\u0020a\u0020new\u0020item\u0020at\u0020the\u0020specified\u0020offset.", - "url": "classes/OCC-Basics-DataStructures-Traits-StrictSplDatastructureTrait.html#method_add" + "url": "classes/OCC-Basics-DataStructures-Traits-StrictSplDoublyLinkedListTrait.html#method_add" }, { - "fqsen": "\\OCC\\Basics\\DataStructures\\Traits\\StrictSplDatastructureTrait\u003A\u003Aappend\u0028\u0029", + "fqsen": "\\OCC\\Basics\\DataStructures\\Traits\\StrictSplDoublyLinkedListTrait\u003A\u003Aappend\u0028\u0029", "name": "append", "summary": "Append\u0020items\u0020at\u0020the\u0020end\u0020of\u0020the\u0020list.", - "url": "classes/OCC-Basics-DataStructures-Traits-StrictSplDatastructureTrait.html#method_append" + "url": "classes/OCC-Basics-DataStructures-Traits-StrictSplDoublyLinkedListTrait.html#method_append" }, { - "fqsen": "\\OCC\\Basics\\DataStructures\\Traits\\StrictSplDatastructureTrait\u003A\u003Aclear\u0028\u0029", + "fqsen": "\\OCC\\Basics\\DataStructures\\Traits\\StrictSplDoublyLinkedListTrait\u003A\u003Aclear\u0028\u0029", "name": "clear", "summary": "Clear\u0020the\u0020list\u0020of\u0020any\u0020items.", - "url": "classes/OCC-Basics-DataStructures-Traits-StrictSplDatastructureTrait.html#method_clear" + "url": "classes/OCC-Basics-DataStructures-Traits-StrictSplDoublyLinkedListTrait.html#method_clear" }, { - "fqsen": "\\OCC\\Basics\\DataStructures\\Traits\\StrictSplDatastructureTrait\u003A\u003Aget\u0028\u0029", + "fqsen": "\\OCC\\Basics\\DataStructures\\Traits\\StrictSplDoublyLinkedListTrait\u003A\u003Aget\u0028\u0029", "name": "get", "summary": "Get\u0020the\u0020item\u0020at\u0020the\u0020specified\u0020index.", - "url": "classes/OCC-Basics-DataStructures-Traits-StrictSplDatastructureTrait.html#method_get" + "url": "classes/OCC-Basics-DataStructures-Traits-StrictSplDoublyLinkedListTrait.html#method_get" }, { - "fqsen": "\\OCC\\Basics\\DataStructures\\Traits\\StrictSplDatastructureTrait\u003A\u003AisList\u0028\u0029", + "fqsen": "\\OCC\\Basics\\DataStructures\\Traits\\StrictSplDoublyLinkedListTrait\u003A\u003AisList\u0028\u0029", "name": "isList", "summary": "Check\u0020if\u0020this\u0020can\u0020be\u0020considered\u0020a\u0020list.", - "url": "classes/OCC-Basics-DataStructures-Traits-StrictSplDatastructureTrait.html#method_isList" + "url": "classes/OCC-Basics-DataStructures-Traits-StrictSplDoublyLinkedListTrait.html#method_isList" }, { - "fqsen": "\\OCC\\Basics\\DataStructures\\Traits\\StrictSplDatastructureTrait\u003A\u003AoffsetSet\u0028\u0029", + "fqsen": "\\OCC\\Basics\\DataStructures\\Traits\\StrictSplDoublyLinkedListTrait\u003A\u003AoffsetSet\u0028\u0029", "name": "offsetSet", "summary": "Set\u0020the\u0020item\u0020at\u0020the\u0020specified\u0020offset.", - "url": "classes/OCC-Basics-DataStructures-Traits-StrictSplDatastructureTrait.html#method_offsetSet" + "url": "classes/OCC-Basics-DataStructures-Traits-StrictSplDoublyLinkedListTrait.html#method_offsetSet" }, { - "fqsen": "\\OCC\\Basics\\DataStructures\\Traits\\StrictSplDatastructureTrait\u003A\u003Aprepend\u0028\u0029", + "fqsen": "\\OCC\\Basics\\DataStructures\\Traits\\StrictSplDoublyLinkedListTrait\u003A\u003Aprepend\u0028\u0029", "name": "prepend", "summary": "Prepend\u0020items\u0020at\u0020the\u0020start\u0020of\u0020the\u0020list.", - "url": "classes/OCC-Basics-DataStructures-Traits-StrictSplDatastructureTrait.html#method_prepend" + "url": "classes/OCC-Basics-DataStructures-Traits-StrictSplDoublyLinkedListTrait.html#method_prepend" }, { - "fqsen": "\\OCC\\Basics\\DataStructures\\Traits\\StrictSplDatastructureTrait\u003A\u003Apush\u0028\u0029", + "fqsen": "\\OCC\\Basics\\DataStructures\\Traits\\StrictSplDoublyLinkedListTrait\u003A\u003Apush\u0028\u0029", "name": "push", "summary": "Push\u0020an\u0020item\u0020at\u0020the\u0020end\u0020of\u0020the\u0020list.", - "url": "classes/OCC-Basics-DataStructures-Traits-StrictSplDatastructureTrait.html#method_push" + "url": "classes/OCC-Basics-DataStructures-Traits-StrictSplDoublyLinkedListTrait.html#method_push" }, { - "fqsen": "\\OCC\\Basics\\DataStructures\\Traits\\StrictSplDatastructureTrait\u003A\u003Aremove\u0028\u0029", + "fqsen": "\\OCC\\Basics\\DataStructures\\Traits\\StrictSplDoublyLinkedListTrait\u003A\u003Aremove\u0028\u0029", "name": "remove", "summary": "Remove\u0020an\u0020item\u0020from\u0020the\u0020list.", - "url": "classes/OCC-Basics-DataStructures-Traits-StrictSplDatastructureTrait.html#method_remove" + "url": "classes/OCC-Basics-DataStructures-Traits-StrictSplDoublyLinkedListTrait.html#method_remove" }, { - "fqsen": "\\OCC\\Basics\\DataStructures\\Traits\\StrictSplDatastructureTrait\u003A\u003Aset\u0028\u0029", + "fqsen": "\\OCC\\Basics\\DataStructures\\Traits\\StrictSplDoublyLinkedListTrait\u003A\u003Aset\u0028\u0029", "name": "set", "summary": "Set\u0020an\u0020item\u0020at\u0020the\u0020specified\u0020index.", - "url": "classes/OCC-Basics-DataStructures-Traits-StrictSplDatastructureTrait.html#method_set" + "url": "classes/OCC-Basics-DataStructures-Traits-StrictSplDoublyLinkedListTrait.html#method_set" }, { - "fqsen": "\\OCC\\Basics\\DataStructures\\Traits\\StrictSplDatastructureTrait\u003A\u003AtoArray\u0028\u0029", + "fqsen": "\\OCC\\Basics\\DataStructures\\Traits\\StrictSplDoublyLinkedListTrait\u003A\u003AtoArray\u0028\u0029", "name": "toArray", "summary": "Return\u0020array\u0020representation\u0020of\u0020list.", - "url": "classes/OCC-Basics-DataStructures-Traits-StrictSplDatastructureTrait.html#method_toArray" + "url": "classes/OCC-Basics-DataStructures-Traits-StrictSplDoublyLinkedListTrait.html#method_toArray" }, { - "fqsen": "\\OCC\\Basics\\DataStructures\\Traits\\StrictSplDatastructureTrait\u003A\u003AtoStrictCollection\u0028\u0029", + "fqsen": "\\OCC\\Basics\\DataStructures\\Traits\\StrictSplDoublyLinkedListTrait\u003A\u003AtoStrictCollection\u0028\u0029", "name": "toStrictCollection", "summary": "Turn\u0020list\u0020into\u0020a\u0020type\u002Dsensitive\u0020collection.", - "url": "classes/OCC-Basics-DataStructures-Traits-StrictSplDatastructureTrait.html#method_toStrictCollection" + "url": "classes/OCC-Basics-DataStructures-Traits-StrictSplDoublyLinkedListTrait.html#method_toStrictCollection" }, { - "fqsen": "\\OCC\\Basics\\DataStructures\\Traits\\StrictSplDatastructureTrait\u003A\u003Aunshift\u0028\u0029", + "fqsen": "\\OCC\\Basics\\DataStructures\\Traits\\StrictSplDoublyLinkedListTrait\u003A\u003Aunshift\u0028\u0029", "name": "unshift", "summary": "Prepend\u0020the\u0020list\u0020with\u0020an\u0020item.", - "url": "classes/OCC-Basics-DataStructures-Traits-StrictSplDatastructureTrait.html#method_unshift" + "url": "classes/OCC-Basics-DataStructures-Traits-StrictSplDoublyLinkedListTrait.html#method_unshift" }, { - "fqsen": "\\OCC\\Basics\\DataStructures\\Traits\\StrictSplDatastructureTrait\u003A\u003A__construct\u0028\u0029", + "fqsen": "\\OCC\\Basics\\DataStructures\\Traits\\StrictSplDoublyLinkedListTrait\u003A\u003A__construct\u0028\u0029", "name": "__construct", "summary": "Create\u0020a\u0020type\u002Dsensitive,\u0020traversable\u0020list\u0020of\u0020items.", - "url": "classes/OCC-Basics-DataStructures-Traits-StrictSplDatastructureTrait.html#method___construct" + "url": "classes/OCC-Basics-DataStructures-Traits-StrictSplDoublyLinkedListTrait.html#method___construct" }, { "fqsen": "\\OCC\\Basics\\ErrorHandlers\\ThrowErrorException", "name": "ThrowErrorException", diff --git a/doc/namespaces/occ-basics-datastructures-traits.html b/doc/namespaces/occ-basics-datastructures-traits.html index a3d2177..55bc5fc 100644 --- a/doc/namespaces/occ-basics-datastructures-traits.html +++ b/doc/namespaces/occ-basics-datastructures-traits.html @@ -194,7 +194,7 @@

                                        -
                                        StrictSplDatastructureTrait
                                        The common interface of all type-sensitive, SPL-based datastructures.
                                        +
                                        StrictSplDoublyLinkedListTrait
                                        The common interface of all type-sensitive, SPL-based datastructures.
                                      • diff --git a/doc/namespaces/occ-basics-interfacetraits.html b/doc/namespaces/occ-basics-interfacetraits.html deleted file mode 100644 index cb03e7a..0000000 --- a/doc/namespaces/occ-basics-interfacetraits.html +++ /dev/null @@ -1,318 +0,0 @@ - - - - - PHP Basics - - - - - - - - - - - - - - - - - - - - - -
                                        -

                                        PHP Basics

                                        - - - - - - -
                                        - -
                                        -
                                        - - - - -
                                        -
                                        - - -
                                        -

                                        InterfaceTraits

                                        - - -

                                        - Table of Contents - - -

                                        - - - - - -

                                        - Traits - - -

                                        -
                                        -
                                        ArrayAccessTrait
                                        A generic implementation of the ArrayAccess interface.
                                        CountableTrait
                                        A generic implementation of the Countable interface.
                                        IteratorAggregateTrait
                                        A generic implementation of the IteratorAggregate interface.
                                        IteratorTrait
                                        A generic implementation of the Iterator interface.
                                        - - - - - - - - - - -
                                        -
                                        -
                                        -
                                        -
                                        
                                        -        
                                        - -
                                        -
                                        - - - -
                                        -
                                        -
                                        - -
                                        - On this page - -
                                          -
                                        • Table Of Contents
                                        • -
                                        • - -
                                        • - - -
                                        -
                                        - -
                                        -
                                        -
                                        -
                                        -
                                        -

                                        Search results

                                        - -
                                        -
                                        -
                                          -
                                          -
                                          -
                                          -
                                          - - -
                                          - - - - - - - - diff --git a/doc/packages/Basics-DataStructures.html b/doc/packages/Basics-DataStructures.html index f797970..75cec34 100644 --- a/doc/packages/Basics-DataStructures.html +++ b/doc/packages/Basics-DataStructures.html @@ -199,7 +199,7 @@

                                          -
                                          StrictSplDatastructureTrait
                                          The common interface of all type-sensitive, SPL-based datastructures.
                                          +
                                          StrictSplDoublyLinkedListTrait
                                          The common interface of all type-sensitive, SPL-based datastructures.
                                          diff --git a/doc/packages/Basics-InterfaceTraits.html b/doc/packages/Basics-InterfaceTraits.html deleted file mode 100644 index 4d728d3..0000000 --- a/doc/packages/Basics-InterfaceTraits.html +++ /dev/null @@ -1,317 +0,0 @@ - - - - - PHP Basics - - - - - - - - - - - - - - - - - - - - - -
                                          -

                                          PHP Basics

                                          - - - - - - -
                                          - -
                                          -
                                          - - - - -
                                          -
                                          - - -
                                          -

                                          InterfaceTraits

                                          - - -

                                          - Table of Contents - - -

                                          - - - - - -

                                          - Traits - - -

                                          -
                                          -
                                          ArrayAccessTrait
                                          A generic implementation of the ArrayAccess interface.
                                          CountableTrait
                                          A generic implementation of the Countable interface.
                                          IteratorAggregateTrait
                                          A generic implementation of the IteratorAggregate interface.
                                          IteratorTrait
                                          A generic implementation of the Iterator interface.
                                          - - - - - - - - - - -
                                          -
                                          -
                                          -
                                          -
                                          
                                          -        
                                          - -
                                          -
                                          - - - -
                                          -
                                          -
                                          - -
                                          - On this page - -
                                            -
                                          • Table Of Contents
                                          • -
                                          • - -
                                          • - - -
                                          -
                                          - -
                                          -
                                          -
                                          -
                                          -
                                          -

                                          Search results

                                          - -
                                          -
                                          -
                                            -
                                            -
                                            -
                                            -
                                            - - -
                                            - - - - - - - -