Update documentation
This commit is contained in:
parent
c249ac7ae7
commit
09d3940a1f
|
@ -54,7 +54,7 @@ v2.0.0
|
|||
* Added new trait :php:trait:`OCC\Basics\Traits\OverloadingGetter`
|
||||
* Added new trait :php:trait:`OCC\Basics\Traits\OverloadingSetter`
|
||||
* Added new trait :php:trait:`OCC\Basics\Traits\TypeChecker`
|
||||
* Extended API for all datastructures (see :php:trait:`OCC\Basics\DataStructures\Traits\StrictSplDatastructureTrait`)
|
||||
* Extended API for all datastructures (see :php:trait:`OCC\Basics\DataStructures\Traits\StrictSplDoublyLinkedListTrait`)
|
||||
* Introduced :php:class:`OCC\Basics\DataStructures\Exceptions\InvalidDataTypeException` for strict datastructures
|
||||
* Extended `documentation <https://opencultureconsulting.github.io/php-basics/>`_
|
||||
|
||||
|
|
|
@ -10,13 +10,13 @@ The datastructures in this package are derived from their respective `Standard P
|
|||
<https://www.php.net/spl.datastructures>`_ which they extend by the option to control the data types of items those
|
||||
datastructures can hold.
|
||||
|
||||
To restrict allowed data types for items, provide the constructor with an array of atomic types or fully qualified
|
||||
class names you want to allow as item types. Available atomic types are `array`, `bool`, `callable`, `countable`,
|
||||
`float` / `double`, `int` / `integer` / `long`, `iterable`, `null`, `numeric`, `object`, `resource`, `scalar` and
|
||||
`string`.
|
||||
To restrict allowed data types for items provide the constructor with an array of atomic types or fully qualified class
|
||||
names (FQCN) you want to allow as item types. Available atomic types are `array`, `bool`, `callable`, `countable`,
|
||||
`float` (or `double`), `int` (or `integer` or `long`), `iterable`, `null`, `numeric`, `object`, `resource`, `scalar`
|
||||
and `string`.
|
||||
|
||||
Trying to add an item with a data type not on the list of allowed types to a strict datastructure will result in an
|
||||
:php:class:`OCC\Basics\DataStructures\Exceptions\InvalidDataTypeException`.
|
||||
:php:class:`OCC\Basics\DataStructures\Exceptions\InvalidDataTypeException` being thrown.
|
||||
|
||||
All strict datastructures inherit the implementation of the `\ArrayAccess <https://www.php.net/arrayaccess>`_,
|
||||
`\Countable <https://www.php.net/countable>`_ and `\Serializable <https://www.php.net/serializable>`_ interfaces. All
|
||||
|
|
|
@ -6,8 +6,8 @@ Overview
|
|||
The package currently contains classes for :doc:`datastructures`, :doc:`errorhandlers`, multiple :doc:`interfaces`, and
|
||||
more generic :doc:`traits` for common use cases. They share the same design principles like property and method naming
|
||||
schema, the highest coding standards of `PHPStan <https://phpstan.org/>`_ and `Psalm <https://psalm.dev/>`_, and full
|
||||
`PSR-12 <https://www.php-fig.org/psr/psr-12/>`_ compliance to make sure they can be combined and easily re-used in
|
||||
other projects.
|
||||
`PSR-12 <https://www.php-fig.org/psr/psr-12/>`_ compliance to make sure they can be combined and easily used in other
|
||||
projects.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
|
|
@ -23,7 +23,7 @@ reading. Replace `{Property}` in the method's name with the name of the actual p
|
|||
letter).
|
||||
|
||||
Trying to access an undefined property or a property without corresponding "magic" getter method will result in an
|
||||
`\InvalidArgumentException <https://www.php.net/invalidargumentexception>`_.
|
||||
`\InvalidArgumentException <https://www.php.net/invalidargumentexception>`_ being thrown.
|
||||
|
||||
Example: If the property is named `$fooBar`, the "magic" method has to be `_magicGetFooBar()`. This method is then
|
||||
called when `$fooBar` is read in a context where it normally would not be accessible.
|
||||
|
@ -41,7 +41,7 @@ writing. Replace `{Property}` in the method's name with the name of the actual p
|
|||
letter).
|
||||
|
||||
Trying to access an undefined property or a property without corresponding "magic" setter method will result in an
|
||||
`\InvalidArgumentException <https://www.php.net/invalidargumentexception>`_.
|
||||
`\InvalidArgumentException <https://www.php.net/invalidargumentexception>`_ being thrown.
|
||||
|
||||
Example: If the property is named `$fooBar`, the "magic" method has to be `_magicSetFooBar()`. This method is then
|
||||
called when `$fooBar` is written to in a context where it normally would not be accessible.
|
||||
|
@ -109,5 +109,5 @@ TypeChecker
|
|||
This allows to set a list of allowed atomic data types and fully qualified class names. It also provides a method to
|
||||
check if a value's data type matches at least one of these types.
|
||||
|
||||
Available atomic types are `array`, `bool`, `callable`, `countable`, `float` / `double`, `int` / `integer` / `long`,
|
||||
`iterable`, `null`, `numeric`, `object`, `resource`, `scalar` and `string`.
|
||||
Available atomic types are `array`, `bool`, `callable`, `countable`, `float` (or `double`), `int` (or `integer` or
|
||||
`long`), `iterable`, `null`, `numeric`, `object`, `resource`, `scalar` and `string`.
|
||||
|
|
|
@ -9,7 +9,7 @@ Installation
|
|||
Composer
|
||||
========
|
||||
|
||||
The intended and recommended way of re-using this package is via `Composer <https://getcomposer.org/>`_. The following
|
||||
The intended and recommended way of using this package is via `Composer <https://getcomposer.org/>`_. The following
|
||||
command will get you the latest version and make it a dependency of your project. It will also register all classes and
|
||||
traits with the autoloader to make them available inside the application.
|
||||
|
||||
|
@ -23,8 +23,8 @@ the desired version constraint:
|
|||
|
||||
.. code-block:: shell
|
||||
|
||||
# This will install the latest patch level version of 2.0 (i. e. >=2.0.0 && <2.1.0)
|
||||
composer require "opencultureconsulting/basics:~2.0"
|
||||
# This will install the latest patch level version of 2.1 (i. e. >=2.1.0 && <2.2.0)
|
||||
composer require "opencultureconsulting/basics:~2.1"
|
||||
|
||||
All available versions as well as further information about :doc:`requirements` and dependencies can be found on
|
||||
`Packagist <https://packagist.org/packages/opencultureconsulting/basics>`_.
|
||||
|
@ -46,8 +46,8 @@ well:
|
|||
|
||||
.. code-block:: shell
|
||||
|
||||
# This will clone the repository state at version "2.0.0" into the "basics" directory
|
||||
git clone --branch=v2.0.0 https://github.com/opencultureconsulting/php-basics.git basics
|
||||
# This will clone the repository state at version "2.1.0" into the "basics" directory
|
||||
git clone --branch=v2.1.0 https://github.com/opencultureconsulting/php-basics.git basics
|
||||
|
||||
Be aware that you also need to make the classes and traits available in your application by either adding them to your
|
||||
autoloader or by including all files individually in PHP.
|
||||
|
|
|
@ -9,8 +9,8 @@ Environment
|
|||
This package requires at least **PHP 8.1**.
|
||||
|
||||
It is highly recommended to use `Composer <https://getcomposer.org/>`_ for dependency management and autoloading,
|
||||
although it is technically not strictly required for re-using any of these classes and traits. But it certainly
|
||||
makes it a lot easier!
|
||||
although it is technically not strictly required for using any of these classes and traits. But it certainly makes it a
|
||||
lot easier!
|
||||
|
||||
Dependencies
|
||||
============
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
***A collection of generic classes and useful traits for PHP projects.***
|
||||
|
||||
The package currently contains classes for [type-sensitive data structures](src/DataStructures/), [error and exception handlers](src/ErrorHandlers/), multiple [traits implementing standard interfaces](src/Interfaces/), and more generic [traits for common use cases](src/Traits/). They share the same design principles like property and method naming schema, highest coding standards of [PHPStan](https://phpstan.org/) and [Psalm](https://psalm.dev/), and full [PSR-12](https://www.php-fig.org/psr/psr-12/) compliance to make sure they can be combined and easily re-used in other projects.
|
||||
The package currently contains classes for [type-sensitive data structures](src/DataStructures/), [error and exception handlers](src/ErrorHandlers/), multiple [traits implementing standard interfaces](src/Interfaces/), and more generic [traits for common use cases](src/Traits/). They share the same design principles like property and method naming schema, highest coding standards of [PHPStan](https://phpstan.org/) and [Psalm](https://psalm.dev/), and full [PSR-12](https://www.php-fig.org/psr/psr-12/) compliance to make sure they can be combined and easily used in other projects.
|
||||
|
||||
## Quick Start
|
||||
|
||||
The intended and recommended way of re-using this package is via [Composer](https://getcomposer.org/). The following command will get you the latest version:
|
||||
The intended and recommended way of using this package is via [Composer](https://getcomposer.org/). The following command will get you the latest version:
|
||||
|
||||
composer require opencultureconsulting/basics
|
||||
|
||||
|
|
|
@ -209,6 +209,7 @@
|
|||
|
||||
<p class="phpdocumentor-summary">Common exception for type-sensitive datastructures.</p>
|
||||
|
||||
|
||||
<section class="phpdocumentor-description"><p>Exception thrown if a value does not adhere to the defined list of valid
|
||||
data types.</p>
|
||||
</section>
|
||||
|
@ -233,6 +234,8 @@ data types.</p>
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 id="toc">
|
||||
Table of Contents
|
||||
<a href="classes/OCC-Basics-DataStructures-Exceptions-InvalidDataTypeException.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
|
||||
|
@ -251,7 +254,6 @@ data types.</p>
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -195,7 +195,7 @@
|
|||
<abbr title="\Iterator">Iterator</abbr> </span>
|
||||
|
||||
<span class="phpdocumentor-element__extends">
|
||||
Uses
|
||||
uses
|
||||
<a href="classes/OCC-Basics-Interfaces-IteratorTrait.html"><abbr title="\OCC\Basics\Interfaces\IteratorTrait">IteratorTrait</abbr></a> </span>
|
||||
</h2>
|
||||
|
||||
|
@ -214,6 +214,7 @@
|
|||
|
||||
<p class="phpdocumentor-summary">A type-sensitive, traversable array.</p>
|
||||
|
||||
|
||||
<section class="phpdocumentor-description"><p>Holds items as key/value pairs where keys have to be valid array keys while
|
||||
values can be of any type. To restrict allowed data types for items, provide
|
||||
the constructor with an array of atomic types or fully qualified class
|
||||
|
@ -250,6 +251,8 @@ names.</p>
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 id="toc">
|
||||
Table of Contents
|
||||
<a href="classes/OCC-Basics-DataStructures-StrictArray.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
|
||||
|
@ -279,231 +282,231 @@ names.</p>
|
|||
</h4>
|
||||
<dl class="phpdocumentor-table-of-contents">
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method___construct">__construct()</a>
|
||||
<a class="" href="classes/OCC-Basics-DataStructures-StrictCollection.html#method___construct">__construct()</a>
|
||||
<span>
|
||||
: void </span>
|
||||
</dt>
|
||||
<dd>Create a type-sensitive collection of items.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_add">add()</a>
|
||||
<a class="" href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_add">add()</a>
|
||||
<span>
|
||||
: void </span>
|
||||
</dt>
|
||||
<dd>Add/insert a item at the specified index.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-DataStructures-StrictArray.html#method_bottom">bottom()</a>
|
||||
<a class="" href="classes/OCC-Basics-DataStructures-StrictArray.html#method_bottom">bottom()</a>
|
||||
<span>
|
||||
: <abbr title="\OCC\Basics\DataStructures\AllowedType">AllowedType</abbr> </span>
|
||||
</dt>
|
||||
<dd>Peek at the first item of the array.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_clear">clear()</a>
|
||||
<a class="" href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_clear">clear()</a>
|
||||
<span>
|
||||
: void </span>
|
||||
</dt>
|
||||
<dd>Clear the collection of any items.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-Interfaces-CountableTrait.html#method_count">count()</a>
|
||||
<a class="" href="classes/OCC-Basics-Interfaces-CountableTrait.html#method_count">count()</a>
|
||||
<span>
|
||||
: int<0, max> </span>
|
||||
</dt>
|
||||
<dd>Count the data items.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_current">current()</a>
|
||||
<a class="" href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_current">current()</a>
|
||||
<span>
|
||||
: <abbr title="\OCC\Basics\Interfaces\TValue">TValue</abbr>|null </span>
|
||||
</dt>
|
||||
<dd>Return the current item.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_get">get()</a>
|
||||
<a class="" href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_get">get()</a>
|
||||
<span>
|
||||
: <abbr title="\OCC\Basics\DataStructures\AllowedType">AllowedType</abbr> </span>
|
||||
</dt>
|
||||
<dd>Get the item at the specified index.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-Traits-TypeChecker.html#method_getAllowedTypes">getAllowedTypes()</a>
|
||||
<a class="" href="classes/OCC-Basics-Traits-TypeChecker.html#method_getAllowedTypes">getAllowedTypes()</a>
|
||||
<span>
|
||||
: array<string|int, string> </span>
|
||||
</dt>
|
||||
<dd>Get allowed data types.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-Traits-TypeChecker.html#method_hasAllowedType">hasAllowedType()</a>
|
||||
<a class="" href="classes/OCC-Basics-Traits-TypeChecker.html#method_hasAllowedType">hasAllowedType()</a>
|
||||
<span>
|
||||
: bool </span>
|
||||
</dt>
|
||||
<dd>Check if a value's data type is allowed.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-Traits-TypeChecker.html#method_isAllowedType">isAllowedType()</a>
|
||||
<a class="" href="classes/OCC-Basics-Traits-TypeChecker.html#method_isAllowedType">isAllowedType()</a>
|
||||
<span>
|
||||
: bool </span>
|
||||
</dt>
|
||||
<dd>Check if a data type is allowed.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_isEmpty">isEmpty()</a>
|
||||
<a class="" href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_isEmpty">isEmpty()</a>
|
||||
<span>
|
||||
: bool </span>
|
||||
</dt>
|
||||
<dd>Check if collection is empty.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_isList">isList()</a>
|
||||
<a class="" href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_isList">isList()</a>
|
||||
<span>
|
||||
: bool </span>
|
||||
</dt>
|
||||
<dd>Check if this collection can be considered a list.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_key">key()</a>
|
||||
<a class="" href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_key">key()</a>
|
||||
<span>
|
||||
: string|int|null </span>
|
||||
</dt>
|
||||
<dd>Return the current key.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_next">next()</a>
|
||||
<a class="" href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_next">next()</a>
|
||||
<span>
|
||||
: void </span>
|
||||
</dt>
|
||||
<dd>Move forward to next item.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#method_offsetExists">offsetExists()</a>
|
||||
<a class="" href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#method_offsetExists">offsetExists()</a>
|
||||
<span>
|
||||
: bool </span>
|
||||
</dt>
|
||||
<dd>Check if the specified offset exists.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#method_offsetGet">offsetGet()</a>
|
||||
<a class="" href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#method_offsetGet">offsetGet()</a>
|
||||
<span>
|
||||
: <abbr title="\OCC\Basics\Interfaces\TValue">TValue</abbr>|null </span>
|
||||
</dt>
|
||||
<dd>Retrieve data at the specified offset.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#method_offsetSet">offsetSet()</a>
|
||||
<a class="" href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_offsetSet">offsetSet()</a>
|
||||
<span>
|
||||
: void </span>
|
||||
</dt>
|
||||
<dd>Assign a value to the specified offset.</dd>
|
||||
<dd>Set the item at the specified offset.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#method_offsetUnset">offsetUnset()</a>
|
||||
<a class="" href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#method_offsetUnset">offsetUnset()</a>
|
||||
<span>
|
||||
: void </span>
|
||||
</dt>
|
||||
<dd>Unset the specified offset.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-DataStructures-StrictArray.html#method_pop">pop()</a>
|
||||
<a class="" href="classes/OCC-Basics-DataStructures-StrictArray.html#method_pop">pop()</a>
|
||||
<span>
|
||||
: <abbr title="\OCC\Basics\DataStructures\AllowedType">AllowedType</abbr> </span>
|
||||
</dt>
|
||||
<dd>Pop the item from the end of the array.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_prev">prev()</a>
|
||||
<a class="" href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_prev">prev()</a>
|
||||
<span>
|
||||
: void </span>
|
||||
</dt>
|
||||
<dd>Move back to previous item.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-DataStructures-StrictArray.html#method_push">push()</a>
|
||||
<a class="" href="classes/OCC-Basics-DataStructures-StrictArray.html#method_push">push()</a>
|
||||
<span>
|
||||
: void </span>
|
||||
</dt>
|
||||
<dd>Push an item at the end of the array.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_remove">remove()</a>
|
||||
<a class="" href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_remove">remove()</a>
|
||||
<span>
|
||||
: void </span>
|
||||
</dt>
|
||||
<dd>Remove an item from the collection.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_rewind">rewind()</a>
|
||||
<a class="" href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_rewind">rewind()</a>
|
||||
<span>
|
||||
: void </span>
|
||||
</dt>
|
||||
<dd>Rewind the iterator to the first item.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_serialize">serialize()</a>
|
||||
<a class="" href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_serialize">serialize()</a>
|
||||
<span>
|
||||
: string </span>
|
||||
</dt>
|
||||
<dd>Get string representation of $this.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_set">set()</a>
|
||||
<a class="" href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_set">set()</a>
|
||||
<span>
|
||||
: void </span>
|
||||
</dt>
|
||||
<dd>Set an item at the specified index.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-Traits-TypeChecker.html#method_setAllowedTypes">setAllowedTypes()</a>
|
||||
<a class="" href="classes/OCC-Basics-Traits-TypeChecker.html#method_setAllowedTypes">setAllowedTypes()</a>
|
||||
<span>
|
||||
: void </span>
|
||||
</dt>
|
||||
<dd>Set allowed data types.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-DataStructures-StrictArray.html#method_shift">shift()</a>
|
||||
<a class="" href="classes/OCC-Basics-DataStructures-StrictArray.html#method_shift">shift()</a>
|
||||
<span>
|
||||
: <abbr title="\OCC\Basics\DataStructures\AllowedType">AllowedType</abbr> </span>
|
||||
</dt>
|
||||
<dd>Shift the item from the beginning of the array.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_toArray">toArray()</a>
|
||||
<a class="" href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_toArray">toArray()</a>
|
||||
<span>
|
||||
: array<string|int, <abbr title="\OCC\Basics\DataStructures\AllowedType">AllowedType</abbr>> </span>
|
||||
</dt>
|
||||
<dd>Return array representation of collection.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-DataStructures-StrictArray.html#method_top">top()</a>
|
||||
<a class="" href="classes/OCC-Basics-DataStructures-StrictArray.html#method_top">top()</a>
|
||||
<span>
|
||||
: <abbr title="\OCC\Basics\DataStructures\AllowedType">AllowedType</abbr> </span>
|
||||
</dt>
|
||||
<dd>Peek at the last item of the array.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_toStrictList">toStrictList()</a>
|
||||
<a class="" href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_toStrictList">toStrictList()</a>
|
||||
<span>
|
||||
: <a href="classes/OCC-Basics-DataStructures-StrictList.html"><abbr title="\OCC\Basics\DataStructures\StrictList">StrictList</abbr></a><string|int, <abbr title="\OCC\Basics\DataStructures\AllowedType">AllowedType</abbr>> </span>
|
||||
</dt>
|
||||
<dd>Turn collection into a type-sensitive list.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_unserialize">unserialize()</a>
|
||||
<a class="" href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_unserialize">unserialize()</a>
|
||||
<span>
|
||||
: void </span>
|
||||
</dt>
|
||||
<dd>Restore $this from string representation.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-DataStructures-StrictArray.html#method_unshift">unshift()</a>
|
||||
<a class="" href="classes/OCC-Basics-DataStructures-StrictArray.html#method_unshift">unshift()</a>
|
||||
<span>
|
||||
: void </span>
|
||||
</dt>
|
||||
<dd>Prepend the array with an item.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_valid">valid()</a>
|
||||
<a class="" href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_valid">valid()</a>
|
||||
<span>
|
||||
: bool </span>
|
||||
</dt>
|
||||
|
@ -513,7 +516,6 @@ names.</p>
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -552,6 +554,7 @@ names.</p>
|
|||
<div class="phpdocumentor-label-line">
|
||||
</div>
|
||||
|
||||
|
||||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||||
<dl class="phpdocumentor-argument-list">
|
||||
<dt class="phpdocumentor-argument-list__entry">
|
||||
|
@ -602,6 +605,8 @@ Possible values are:</p>
|
|||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
<article
|
||||
class="phpdocumentor-element
|
||||
|
@ -633,6 +638,7 @@ Possible values are:</p>
|
|||
|
||||
</div>
|
||||
|
||||
|
||||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||||
<dl class="phpdocumentor-argument-list">
|
||||
<dt class="phpdocumentor-argument-list__entry">
|
||||
|
@ -675,6 +681,8 @@ Possible values are:</p>
|
|||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
<article
|
||||
class="phpdocumentor-element
|
||||
|
@ -708,6 +716,7 @@ Possible values are:</p>
|
|||
|
||||
|
||||
|
||||
|
||||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||||
Tags
|
||||
<a href="classes/OCC-Basics-DataStructures-StrictArray.html#method_bottom#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||||
|
@ -726,6 +735,8 @@ Possible values are:</p>
|
|||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||||
<span class="phpdocumentor-signature__response_type"><abbr title="\OCC\Basics\DataStructures\AllowedType">AllowedType</abbr></span>
|
||||
|
@ -768,6 +779,9 @@ Possible values are:</p>
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
|
@ -803,6 +817,9 @@ Possible values are:</p>
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||||
|
@ -846,6 +863,9 @@ Possible values are:</p>
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||||
|
@ -887,6 +907,7 @@ Possible values are:</p>
|
|||
|
||||
</div>
|
||||
|
||||
|
||||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||||
<dl class="phpdocumentor-argument-list">
|
||||
<dt class="phpdocumentor-argument-list__entry">
|
||||
|
@ -919,6 +940,8 @@ Possible values are:</p>
|
|||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||||
<span class="phpdocumentor-signature__response_type"><abbr title="\OCC\Basics\DataStructures\AllowedType">AllowedType</abbr></span>
|
||||
|
@ -961,6 +984,9 @@ Possible values are:</p>
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||||
|
@ -1002,6 +1028,7 @@ Possible values are:</p>
|
|||
|
||||
</div>
|
||||
|
||||
|
||||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||||
<dl class="phpdocumentor-argument-list">
|
||||
<dt class="phpdocumentor-argument-list__entry">
|
||||
|
@ -1017,6 +1044,8 @@ Possible values are:</p>
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||||
<span class="phpdocumentor-signature__response_type">bool</span>
|
||||
|
@ -1057,6 +1086,7 @@ Possible values are:</p>
|
|||
|
||||
</div>
|
||||
|
||||
|
||||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||||
<dl class="phpdocumentor-argument-list">
|
||||
<dt class="phpdocumentor-argument-list__entry">
|
||||
|
@ -1072,6 +1102,8 @@ Possible values are:</p>
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||||
<span class="phpdocumentor-signature__response_type">bool</span>
|
||||
|
@ -1114,6 +1146,9 @@ Possible values are:</p>
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||||
|
@ -1154,6 +1189,7 @@ Possible values are:</p>
|
|||
<div class="phpdocumentor-label phpdocumentor-label--success"><span>API</span><span>Yes</span></div>
|
||||
|
||||
</div>
|
||||
|
||||
<section class="phpdocumentor-description"><p>It is considered a list if all keys are consecutive integers starting
|
||||
from <code class="prettyprint">0</code>.</p>
|
||||
</section>
|
||||
|
@ -1176,6 +1212,8 @@ from <code class="prettyprint">0</code>.</p>
|
|||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||||
<span class="phpdocumentor-signature__response_type">bool</span>
|
||||
|
@ -1218,6 +1256,9 @@ from <code class="prettyprint">0</code>.</p>
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||||
|
@ -1261,6 +1302,9 @@ from <code class="prettyprint">0</code>.</p>
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
|
@ -1294,6 +1338,7 @@ from <code class="prettyprint">0</code>.</p>
|
|||
|
||||
</div>
|
||||
|
||||
|
||||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||||
<dl class="phpdocumentor-argument-list">
|
||||
<dt class="phpdocumentor-argument-list__entry">
|
||||
|
@ -1309,6 +1354,8 @@ from <code class="prettyprint">0</code>.</p>
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||||
<span class="phpdocumentor-signature__response_type">bool</span>
|
||||
|
@ -1349,6 +1396,7 @@ from <code class="prettyprint">0</code>.</p>
|
|||
|
||||
</div>
|
||||
|
||||
|
||||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||||
<dl class="phpdocumentor-argument-list">
|
||||
<dt class="phpdocumentor-argument-list__entry">
|
||||
|
@ -1364,6 +1412,8 @@ from <code class="prettyprint">0</code>.</p>
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||||
<span class="phpdocumentor-signature__response_type"><abbr title="\OCC\Basics\Interfaces\TValue">TValue</abbr>|null</span>
|
||||
|
@ -1382,28 +1432,29 @@ from <code class="prettyprint">0</code>.</p>
|
|||
>
|
||||
<h4 class="phpdocumentor-element__name" id="method_offsetSet">
|
||||
offsetSet()
|
||||
<a href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#method_offsetSet" class="headerlink"><i class="fas fa-link"></i></a>
|
||||
<a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_offsetSet" class="headerlink"><i class="fas fa-link"></i></a>
|
||||
|
||||
</h4>
|
||||
<aside class="phpdocumentor-element-found-in">
|
||||
<abbr class="phpdocumentor-element-found-in__file" title="src/Interfaces/ArrayAccessTrait.php"><a href="files/src-interfaces-arrayaccesstrait.html"><abbr title="src/Interfaces/ArrayAccessTrait.php">ArrayAccessTrait.php</abbr></a></abbr>
|
||||
<abbr class="phpdocumentor-element-found-in__file" title="src/DataStructures/StrictCollection.php"><a href="files/src-datastructures-strictcollection.html"><abbr title="src/DataStructures/StrictCollection.php">StrictCollection.php</abbr></a></abbr>
|
||||
:
|
||||
<span class="phpdocumentor-element-found-in__line">93</span>
|
||||
<span class="phpdocumentor-element-found-in__line">179</span>
|
||||
|
||||
<a href="classes/OCC-Basics-DataStructures-StrictArray.html#source-view.93" class="phpdocumentor-element-found-in__source" data-line="93" data-modal="source-view" data-src="files/src/Interfaces/ArrayAccessTrait.php.txt"></a>
|
||||
<a href="classes/OCC-Basics-DataStructures-StrictArray.html#source-view.179" class="phpdocumentor-element-found-in__source" data-line="179" data-modal="source-view" data-src="files/src/DataStructures/StrictCollection.php.txt"></a>
|
||||
</aside>
|
||||
|
||||
<p class="phpdocumentor-summary">Assign a value to the specified offset.</p>
|
||||
<p class="phpdocumentor-summary">Set the item at the specified offset.</p>
|
||||
|
||||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||||
<span class="phpdocumentor-signature__visibility">public</span>
|
||||
<span class="phpdocumentor-signature__name">offsetSet</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string|int|null </span><span class="phpdocumentor-signature__argument__name">$offset</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><abbr title="\OCC\Basics\Interfaces\TValue">TValue</abbr> </span><span class="phpdocumentor-signature__argument__name">$value</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
|
||||
<span class="phpdocumentor-signature__name">offsetSet</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string|int|null </span><span class="phpdocumentor-signature__argument__name">$offset</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><abbr title="\OCC\Basics\DataStructures\AllowedType">AllowedType</abbr> </span><span class="phpdocumentor-signature__argument__name">$value</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
|
||||
|
||||
<div class="phpdocumentor-label-line">
|
||||
<div class="phpdocumentor-label phpdocumentor-label--success"><span>API</span><span>Yes</span></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||||
<dl class="phpdocumentor-argument-list">
|
||||
<dt class="phpdocumentor-argument-list__entry">
|
||||
|
@ -1411,22 +1462,51 @@ from <code class="prettyprint">0</code>.</p>
|
|||
: <span class="phpdocumentor-signature__argument__return-type">string|int|null</span>
|
||||
</dt>
|
||||
<dd class="phpdocumentor-argument-list__definition">
|
||||
<section class="phpdocumentor-description"><p>The offset to assign to or NULL to append</p>
|
||||
<section class="phpdocumentor-description"><p>The offset being set</p>
|
||||
</section>
|
||||
|
||||
</dd>
|
||||
<dt class="phpdocumentor-argument-list__entry">
|
||||
<span class="phpdocumentor-signature__argument__name">$value</span>
|
||||
: <span class="phpdocumentor-signature__argument__return-type"><abbr title="\OCC\Basics\Interfaces\TValue">TValue</abbr></span>
|
||||
: <span class="phpdocumentor-signature__argument__return-type"><abbr title="\OCC\Basics\DataStructures\AllowedType">AllowedType</abbr></span>
|
||||
</dt>
|
||||
<dd class="phpdocumentor-argument-list__definition">
|
||||
<section class="phpdocumentor-description"><p>The value to set</p>
|
||||
<section class="phpdocumentor-description"><p>The new item for the offset</p>
|
||||
</section>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||||
Tags
|
||||
<a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_offsetSet#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||||
|
||||
</h5>
|
||||
<dl class="phpdocumentor-tag-list">
|
||||
<dt class="phpdocumentor-tag-list__entry">
|
||||
<span class="phpdocumentor-tag__name">throws</span>
|
||||
</dt>
|
||||
<dd class="phpdocumentor-tag-list__definition">
|
||||
<span class="phpdocumentor-tag-link"><a href="classes/OCC-Basics-DataStructures-Exceptions-InvalidDataTypeException.html"><abbr title="\OCC\Basics\DataStructures\Exceptions\InvalidDataTypeException">InvalidDataTypeException</abbr></a></span>
|
||||
|
||||
<section class="phpdocumentor-description"><p>if <code class="prettyprint">$value</code> is not of allowed type</p>
|
||||
</section>
|
||||
|
||||
</dd>
|
||||
<dt class="phpdocumentor-tag-list__entry">
|
||||
<span class="phpdocumentor-tag__name">throws</span>
|
||||
</dt>
|
||||
<dd class="phpdocumentor-tag-list__definition">
|
||||
<span class="phpdocumentor-tag-link"><abbr title="\InvalidArgumentException">InvalidArgumentException</abbr></span>
|
||||
|
||||
<section class="phpdocumentor-description"><p>if <code class="prettyprint">$offset</code> is not a valid array key</p>
|
||||
</section>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
|
@ -1460,6 +1540,7 @@ from <code class="prettyprint">0</code>.</p>
|
|||
|
||||
</div>
|
||||
|
||||
|
||||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||||
<dl class="phpdocumentor-argument-list">
|
||||
<dt class="phpdocumentor-argument-list__entry">
|
||||
|
@ -1476,6 +1557,8 @@ from <code class="prettyprint">0</code>.</p>
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
<article
|
||||
class="phpdocumentor-element
|
||||
|
@ -1509,6 +1592,7 @@ from <code class="prettyprint">0</code>.</p>
|
|||
|
||||
|
||||
|
||||
|
||||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||||
Tags
|
||||
<a href="classes/OCC-Basics-DataStructures-StrictArray.html#method_pop#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||||
|
@ -1527,6 +1611,8 @@ from <code class="prettyprint">0</code>.</p>
|
|||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||||
<span class="phpdocumentor-signature__response_type"><abbr title="\OCC\Basics\DataStructures\AllowedType">AllowedType</abbr></span>
|
||||
|
@ -1569,6 +1655,9 @@ from <code class="prettyprint">0</code>.</p>
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
|
@ -1602,6 +1691,7 @@ from <code class="prettyprint">0</code>.</p>
|
|||
|
||||
</div>
|
||||
|
||||
|
||||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||||
<dl class="phpdocumentor-argument-list">
|
||||
<dt class="phpdocumentor-argument-list__entry">
|
||||
|
@ -1635,6 +1725,8 @@ from <code class="prettyprint">0</code>.</p>
|
|||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
<article
|
||||
class="phpdocumentor-element
|
||||
|
@ -1666,6 +1758,7 @@ from <code class="prettyprint">0</code>.</p>
|
|||
|
||||
</div>
|
||||
|
||||
|
||||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||||
<dl class="phpdocumentor-argument-list">
|
||||
<dt class="phpdocumentor-argument-list__entry">
|
||||
|
@ -1699,6 +1792,8 @@ from <code class="prettyprint">0</code>.</p>
|
|||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
<article
|
||||
class="phpdocumentor-element
|
||||
|
@ -1732,6 +1827,9 @@ from <code class="prettyprint">0</code>.</p>
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
|
@ -1765,6 +1863,9 @@ from <code class="prettyprint">0</code>.</p>
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||||
|
@ -1806,6 +1907,7 @@ from <code class="prettyprint">0</code>.</p>
|
|||
|
||||
</div>
|
||||
|
||||
|
||||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||||
<dl class="phpdocumentor-argument-list">
|
||||
<dt class="phpdocumentor-argument-list__entry">
|
||||
|
@ -1848,6 +1950,8 @@ from <code class="prettyprint">0</code>.</p>
|
|||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
<article
|
||||
class="phpdocumentor-element
|
||||
|
@ -1879,6 +1983,7 @@ from <code class="prettyprint">0</code>.</p>
|
|||
|
||||
</div>
|
||||
|
||||
|
||||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||||
<dl class="phpdocumentor-argument-list">
|
||||
<dt class="phpdocumentor-argument-list__entry">
|
||||
|
@ -1912,6 +2017,8 @@ from <code class="prettyprint">0</code>.</p>
|
|||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
<article
|
||||
class="phpdocumentor-element
|
||||
|
@ -1945,6 +2052,7 @@ from <code class="prettyprint">0</code>.</p>
|
|||
|
||||
|
||||
|
||||
|
||||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||||
Tags
|
||||
<a href="classes/OCC-Basics-DataStructures-StrictArray.html#method_shift#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||||
|
@ -1963,6 +2071,8 @@ from <code class="prettyprint">0</code>.</p>
|
|||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||||
<span class="phpdocumentor-signature__response_type"><abbr title="\OCC\Basics\DataStructures\AllowedType">AllowedType</abbr></span>
|
||||
|
@ -2005,6 +2115,9 @@ from <code class="prettyprint">0</code>.</p>
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||||
|
@ -2048,6 +2161,7 @@ from <code class="prettyprint">0</code>.</p>
|
|||
|
||||
|
||||
|
||||
|
||||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||||
Tags
|
||||
<a href="classes/OCC-Basics-DataStructures-StrictArray.html#method_top#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||||
|
@ -2066,6 +2180,8 @@ from <code class="prettyprint">0</code>.</p>
|
|||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||||
<span class="phpdocumentor-signature__response_type"><abbr title="\OCC\Basics\DataStructures\AllowedType">AllowedType</abbr></span>
|
||||
|
@ -2108,6 +2224,7 @@ from <code class="prettyprint">0</code>.</p>
|
|||
|
||||
|
||||
|
||||
|
||||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||||
Tags
|
||||
<a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_toStrictList#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||||
|
@ -2134,6 +2251,8 @@ from <code class="prettyprint">0</code>.</p>
|
|||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||||
<span class="phpdocumentor-signature__response_type"><a href="classes/OCC-Basics-DataStructures-StrictList.html"><abbr title="\OCC\Basics\DataStructures\StrictList">StrictList</abbr></a><string|int, <abbr title="\OCC\Basics\DataStructures\AllowedType">AllowedType</abbr>></span>
|
||||
|
@ -2172,6 +2291,7 @@ from <code class="prettyprint">0</code>.</p>
|
|||
<div class="phpdocumentor-label-line">
|
||||
</div>
|
||||
|
||||
|
||||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||||
<dl class="phpdocumentor-argument-list">
|
||||
<dt class="phpdocumentor-argument-list__entry">
|
||||
|
@ -2188,6 +2308,8 @@ from <code class="prettyprint">0</code>.</p>
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
<article
|
||||
class="phpdocumentor-element
|
||||
|
@ -2219,6 +2341,7 @@ from <code class="prettyprint">0</code>.</p>
|
|||
|
||||
</div>
|
||||
|
||||
|
||||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||||
<dl class="phpdocumentor-argument-list">
|
||||
<dt class="phpdocumentor-argument-list__entry">
|
||||
|
@ -2252,6 +2375,8 @@ from <code class="prettyprint">0</code>.</p>
|
|||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
<article
|
||||
class="phpdocumentor-element
|
||||
|
@ -2285,6 +2410,9 @@ from <code class="prettyprint">0</code>.</p>
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||||
|
@ -2409,39 +2537,39 @@ from <code class="prettyprint">0</code>.</p>
|
|||
<li class="phpdocumentor-on-this-page-section__title">Methods</li>
|
||||
<li>
|
||||
<ul class="phpdocumentor-list -clean">
|
||||
<li><a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method___construct">__construct()</a></li>
|
||||
<li><a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_add">add()</a></li>
|
||||
<li><a href="classes/OCC-Basics-DataStructures-StrictArray.html#method_bottom">bottom()</a></li>
|
||||
<li><a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_clear">clear()</a></li>
|
||||
<li><a href="classes/OCC-Basics-Interfaces-CountableTrait.html#method_count">count()</a></li>
|
||||
<li><a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_current">current()</a></li>
|
||||
<li><a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_get">get()</a></li>
|
||||
<li><a href="classes/OCC-Basics-Traits-TypeChecker.html#method_getAllowedTypes">getAllowedTypes()</a></li>
|
||||
<li><a href="classes/OCC-Basics-Traits-TypeChecker.html#method_hasAllowedType">hasAllowedType()</a></li>
|
||||
<li><a href="classes/OCC-Basics-Traits-TypeChecker.html#method_isAllowedType">isAllowedType()</a></li>
|
||||
<li><a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_isEmpty">isEmpty()</a></li>
|
||||
<li><a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_isList">isList()</a></li>
|
||||
<li><a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_key">key()</a></li>
|
||||
<li><a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_next">next()</a></li>
|
||||
<li><a href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#method_offsetExists">offsetExists()</a></li>
|
||||
<li><a href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#method_offsetGet">offsetGet()</a></li>
|
||||
<li><a href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#method_offsetSet">offsetSet()</a></li>
|
||||
<li><a href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#method_offsetUnset">offsetUnset()</a></li>
|
||||
<li><a href="classes/OCC-Basics-DataStructures-StrictArray.html#method_pop">pop()</a></li>
|
||||
<li><a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_prev">prev()</a></li>
|
||||
<li><a href="classes/OCC-Basics-DataStructures-StrictArray.html#method_push">push()</a></li>
|
||||
<li><a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_remove">remove()</a></li>
|
||||
<li><a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_rewind">rewind()</a></li>
|
||||
<li><a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_serialize">serialize()</a></li>
|
||||
<li><a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_set">set()</a></li>
|
||||
<li><a href="classes/OCC-Basics-Traits-TypeChecker.html#method_setAllowedTypes">setAllowedTypes()</a></li>
|
||||
<li><a href="classes/OCC-Basics-DataStructures-StrictArray.html#method_shift">shift()</a></li>
|
||||
<li><a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_toArray">toArray()</a></li>
|
||||
<li><a href="classes/OCC-Basics-DataStructures-StrictArray.html#method_top">top()</a></li>
|
||||
<li><a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_toStrictList">toStrictList()</a></li>
|
||||
<li><a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_unserialize">unserialize()</a></li>
|
||||
<li><a href="classes/OCC-Basics-DataStructures-StrictArray.html#method_unshift">unshift()</a></li>
|
||||
<li><a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_valid">valid()</a></li>
|
||||
<li class=""><a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method___construct">__construct()</a></li>
|
||||
<li class=""><a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_add">add()</a></li>
|
||||
<li class=""><a href="classes/OCC-Basics-DataStructures-StrictArray.html#method_bottom">bottom()</a></li>
|
||||
<li class=""><a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_clear">clear()</a></li>
|
||||
<li class=""><a href="classes/OCC-Basics-Interfaces-CountableTrait.html#method_count">count()</a></li>
|
||||
<li class=""><a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_current">current()</a></li>
|
||||
<li class=""><a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_get">get()</a></li>
|
||||
<li class=""><a href="classes/OCC-Basics-Traits-TypeChecker.html#method_getAllowedTypes">getAllowedTypes()</a></li>
|
||||
<li class=""><a href="classes/OCC-Basics-Traits-TypeChecker.html#method_hasAllowedType">hasAllowedType()</a></li>
|
||||
<li class=""><a href="classes/OCC-Basics-Traits-TypeChecker.html#method_isAllowedType">isAllowedType()</a></li>
|
||||
<li class=""><a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_isEmpty">isEmpty()</a></li>
|
||||
<li class=""><a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_isList">isList()</a></li>
|
||||
<li class=""><a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_key">key()</a></li>
|
||||
<li class=""><a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_next">next()</a></li>
|
||||
<li class=""><a href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#method_offsetExists">offsetExists()</a></li>
|
||||
<li class=""><a href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#method_offsetGet">offsetGet()</a></li>
|
||||
<li class=""><a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_offsetSet">offsetSet()</a></li>
|
||||
<li class=""><a href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#method_offsetUnset">offsetUnset()</a></li>
|
||||
<li class=""><a href="classes/OCC-Basics-DataStructures-StrictArray.html#method_pop">pop()</a></li>
|
||||
<li class=""><a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_prev">prev()</a></li>
|
||||
<li class=""><a href="classes/OCC-Basics-DataStructures-StrictArray.html#method_push">push()</a></li>
|
||||
<li class=""><a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_remove">remove()</a></li>
|
||||
<li class=""><a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_rewind">rewind()</a></li>
|
||||
<li class=""><a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_serialize">serialize()</a></li>
|
||||
<li class=""><a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_set">set()</a></li>
|
||||
<li class=""><a href="classes/OCC-Basics-Traits-TypeChecker.html#method_setAllowedTypes">setAllowedTypes()</a></li>
|
||||
<li class=""><a href="classes/OCC-Basics-DataStructures-StrictArray.html#method_shift">shift()</a></li>
|
||||
<li class=""><a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_toArray">toArray()</a></li>
|
||||
<li class=""><a href="classes/OCC-Basics-DataStructures-StrictArray.html#method_top">top()</a></li>
|
||||
<li class=""><a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_toStrictList">toStrictList()</a></li>
|
||||
<li class=""><a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_unserialize">unserialize()</a></li>
|
||||
<li class=""><a href="classes/OCC-Basics-DataStructures-StrictArray.html#method_unshift">unshift()</a></li>
|
||||
<li class=""><a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_valid">valid()</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -192,7 +192,7 @@
|
|||
<abbr title="\ArrayAccess">ArrayAccess</abbr>, <abbr title="\Countable">Countable</abbr>, <abbr title="\Serializable">Serializable</abbr> </span>
|
||||
|
||||
<span class="phpdocumentor-element__extends">
|
||||
Uses
|
||||
uses
|
||||
<a href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html"><abbr title="\OCC\Basics\Interfaces\ArrayAccessTrait">ArrayAccessTrait</abbr></a>, <a href="classes/OCC-Basics-Interfaces-CountableTrait.html"><abbr title="\OCC\Basics\Interfaces\CountableTrait">CountableTrait</abbr></a>, <a href="classes/OCC-Basics-Traits-TypeChecker.html"><abbr title="\OCC\Basics\Traits\TypeChecker">TypeChecker</abbr></a> </span>
|
||||
</h2>
|
||||
|
||||
|
@ -211,6 +211,7 @@
|
|||
|
||||
<p class="phpdocumentor-summary">A type-sensitive, unsorted collection.</p>
|
||||
|
||||
|
||||
<section class="phpdocumentor-description"><p>Holds items as key/value pairs where keys have to be valid array keys while
|
||||
values can be of any type. To restrict allowed data types for items, provide
|
||||
the constructor with an array of atomic types or fully qualified class
|
||||
|
@ -247,6 +248,8 @@ names.</p>
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 id="toc">
|
||||
Table of Contents
|
||||
<a href="classes/OCC-Basics-DataStructures-StrictCollection.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
|
||||
|
@ -276,147 +279,147 @@ names.</p>
|
|||
</h4>
|
||||
<dl class="phpdocumentor-table-of-contents">
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method___construct">__construct()</a>
|
||||
<a class="" href="classes/OCC-Basics-DataStructures-StrictCollection.html#method___construct">__construct()</a>
|
||||
<span>
|
||||
: void </span>
|
||||
</dt>
|
||||
<dd>Create a type-sensitive collection of items.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_add">add()</a>
|
||||
<a class="" href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_add">add()</a>
|
||||
<span>
|
||||
: void </span>
|
||||
</dt>
|
||||
<dd>Add/insert a item at the specified index.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_clear">clear()</a>
|
||||
<a class="" href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_clear">clear()</a>
|
||||
<span>
|
||||
: void </span>
|
||||
</dt>
|
||||
<dd>Clear the collection of any items.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-Interfaces-CountableTrait.html#method_count">count()</a>
|
||||
<a class="" href="classes/OCC-Basics-Interfaces-CountableTrait.html#method_count">count()</a>
|
||||
<span>
|
||||
: int<0, max> </span>
|
||||
</dt>
|
||||
<dd>Count the data items.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_get">get()</a>
|
||||
<a class="" href="classes/OCC-Basics-DataStructures-StrictCollection.html#method_get">get()</a>
|
||||
<span>
|
||||
: <abbr title="\OCC\Basics\DataStructures\AllowedType">AllowedType</abbr> </span>
|
||||
</dt>
|
||||
<dd>Get the item at the specified index.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-Traits-TypeChecker.html#method_getAllowedTypes">getAllowedTypes()</a>
|
||||
<a class="" href="classes/OCC-Basics-Traits-TypeChecker.html#method_getAllowedTypes">getAllowedTypes()</a>
|
||||
<span>
|
||||
: array<string|int, string> </span>
|
||||
</dt>
|
||||
<dd>Get allowed data types.</dd>
|
||||
|
||||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||||
<a href="classes/OCC-Basics-Traits-TypeChecker.html#method_hasAllowedType">hasAllowedType()</a>
|
||||
<a class="" href="classes/OCC-Basics-Traits-TypeChecker.html#method_hasAllowedType">hasAllowedType()</a>
|
||||
<span>
|
||||
: bool </span>
|
||||
</dt>
|
||||
<dd>Check if a value's data type is allowed.</dd>
|
||||