Update API documentation

This commit is contained in:
Sebastian Meyer 2024-02-12 17:21:57 +01:00
parent f4a1c7e5f3
commit 5d41b3c76a
96 changed files with 38323 additions and 0 deletions

View File

@ -0,0 +1,9 @@
Changelog
#########
.. toctree::
:maxdepth: 3
v1.0.0
v1.0.1
v1.1.0

View File

View File

View File

View File

@ -9,3 +9,4 @@ Documentation
:titlesonly: :titlesonly:
installation/index installation/index
changelog/index

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,494 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ.html">OCC</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics.html">Basics</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics-errorhandlers.html">ErrorHandlers</a></li>
</ul>
<article class="phpdocumentor-element -class">
<h2 class="phpdocumentor-content__title">
ThrowErrorException
<div class="phpdocumentor-element__package">
in package
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="packages/Basics.html">Basics</a></li>
<li class="phpdocumentor-breadcrumb"><a href="packages/Basics-ErrorHandlers.html">ErrorHandlers</a></li>
</ul>
</div>
</h2>
<div class="phpdocumentor-label-line">
</div>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/ErrorHandlers/ThrowErrorException.php"><a href="files/src-errorhandlers-throwerrorexception.html"><abbr title="src/ErrorHandlers/ThrowErrorException.php">ThrowErrorException.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">39</span>
<a href="classes/OCC-Basics-ErrorHandlers-ThrowErrorException.html#source-view.39" class="phpdocumentor-element-found-in__source" data-line="39" data-modal="source-view" data-src="files/src/ErrorHandlers/ThrowErrorException.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Throws internal errors as exceptions.</p>
<section class="phpdocumentor-description"><p>If registered as error handler, this converts an internal PHP error into an
<code class="prettyprint">ErrorException</code>. It respects the <code class="prettyprint">error_reporting</code> directive.</p>
<blockquote>
<p>Usage: <code class="prettyprint">set_error_handler(new ThrowErrorException());</code></p>
</blockquote>
</section>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/OCC-Basics-ErrorHandlers-ThrowErrorException.html#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">author</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<section class="phpdocumentor-description"><p>Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
</section>
</dd>
</dl>
<h3 id="toc">
Table of Contents
<a href="classes/OCC-Basics-ErrorHandlers-ThrowErrorException.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-methods">
Methods
<a href="classes/OCC-Basics-ErrorHandlers-ThrowErrorException.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/OCC-Basics-ErrorHandlers-ThrowErrorException.html#method___invoke">__invoke()</a>
<span>
&nbsp;: bool </span>
</dt>
<dd>Convert an internal PHP error into an ErrorException.</dd>
</dl>
<section class="phpdocumentor-methods">
<h3 class="phpdocumentor-elements__header" id="methods">
Methods
<a href="classes/OCC-Basics-ErrorHandlers-ThrowErrorException.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method___invoke">
__invoke()
<a href="classes/OCC-Basics-ErrorHandlers-ThrowErrorException.html#method___invoke" 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/ErrorHandlers/ThrowErrorException.php"><a href="files/src-errorhandlers-throwerrorexception.html"><abbr title="src/ErrorHandlers/ThrowErrorException.php">ThrowErrorException.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">53</span>
<a href="classes/OCC-Basics-ErrorHandlers-ThrowErrorException.html#source-view.53" class="phpdocumentor-element-found-in__source" data-line="53" data-modal="source-view" data-src="files/src/ErrorHandlers/ThrowErrorException.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Convert an internal PHP error into an ErrorException.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">__invoke</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$errno</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">E_USER_ERROR</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$errstr</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">&#039;&#039;</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">string|null&nbsp;</span><span class="phpdocumentor-signature__argument__name">$errfile</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">int|null&nbsp;</span><span class="phpdocumentor-signature__argument__name">$errline</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
<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">
<span class="phpdocumentor-signature__argument__name">$errno</span>
: <span class="phpdocumentor-signature__argument__return-type">int</span>
= <span class="phpdocumentor-signature__argument__default-value">E_USER_ERROR</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>The severity of the error</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$errstr</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
= <span class="phpdocumentor-signature__argument__default-value">&#039;&#039;</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>The error message</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$errfile</span>
: <span class="phpdocumentor-signature__argument__return-type">string|null</span>
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>The name of the file the error was raised in</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$errline</span>
: <span class="phpdocumentor-signature__argument__return-type">int|null</span>
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>The line number the error was raised in</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/OCC-Basics-ErrorHandlers-ThrowErrorException.html#method___invoke#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"><abbr title="\ErrorException">ErrorException</abbr></span>
<section class="phpdocumentor-description"><p>if <code class="prettyprint">error_reporting</code> is set to report the error</p>
</section>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">bool</span>
&mdash;
<section class="phpdocumentor-description"><p>Always returns FALSE when not throwing an exception</p>
</section>
</section>
</article>
</section>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/ErrorHandlers/ThrowErrorException.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="classes/OCC-Basics-ErrorHandlers-ThrowErrorException.html#toc-methods">Methods</a></li>
</ul>
</li>
<li class="phpdocumentor-on-this-page-section__title">Methods</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="classes/OCC-Basics-ErrorHandlers-ThrowErrorException.html#method___invoke">__invoke()</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="classes/OCC-Basics-ErrorHandlers-ThrowErrorException.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,442 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ.html">OCC</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics.html">Basics</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics-errorhandlers.html">ErrorHandlers</a></li>
</ul>
<article class="phpdocumentor-element -class">
<h2 class="phpdocumentor-content__title">
TriggerExceptionError
<div class="phpdocumentor-element__package">
in package
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="packages/Basics.html">Basics</a></li>
<li class="phpdocumentor-breadcrumb"><a href="packages/Basics-ErrorHandlers.html">ErrorHandlers</a></li>
</ul>
</div>
</h2>
<div class="phpdocumentor-label-line">
</div>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/ErrorHandlers/TriggerExceptionError.php"><a href="files/src-errorhandlers-triggerexceptionerror.html"><abbr title="src/ErrorHandlers/TriggerExceptionError.php">TriggerExceptionError.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">39</span>
<a href="classes/OCC-Basics-ErrorHandlers-TriggerExceptionError.html#source-view.39" class="phpdocumentor-element-found-in__source" data-line="39" data-modal="source-view" data-src="files/src/ErrorHandlers/TriggerExceptionError.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Triggers errors for uncaught exceptions.</p>
<section class="phpdocumentor-description"><p>If registered as exception handler, this catches an uncaught exception and
converts it into an internal PHP error of severity <code class="prettyprint">E_USER_ERROR</code>.</p>
<blockquote>
<p>Usage: <code class="prettyprint">set_exception_handler(new TriggerExceptionError());</code></p>
</blockquote>
</section>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/OCC-Basics-ErrorHandlers-TriggerExceptionError.html#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">author</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<section class="phpdocumentor-description"><p>Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
</section>
</dd>
</dl>
<h3 id="toc">
Table of Contents
<a href="classes/OCC-Basics-ErrorHandlers-TriggerExceptionError.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-methods">
Methods
<a href="classes/OCC-Basics-ErrorHandlers-TriggerExceptionError.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/OCC-Basics-ErrorHandlers-TriggerExceptionError.html#method___invoke">__invoke()</a>
<span>
&nbsp;: void </span>
</dt>
<dd>Convert an uncaught exception into an PHP error.</dd>
</dl>
<section class="phpdocumentor-methods">
<h3 class="phpdocumentor-elements__header" id="methods">
Methods
<a href="classes/OCC-Basics-ErrorHandlers-TriggerExceptionError.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method___invoke">
__invoke()
<a href="classes/OCC-Basics-ErrorHandlers-TriggerExceptionError.html#method___invoke" 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/ErrorHandlers/TriggerExceptionError.php"><a href="files/src-errorhandlers-triggerexceptionerror.html"><abbr title="src/ErrorHandlers/TriggerExceptionError.php">TriggerExceptionError.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">48</span>
<a href="classes/OCC-Basics-ErrorHandlers-TriggerExceptionError.html#source-view.48" class="phpdocumentor-element-found-in__source" data-line="48" data-modal="source-view" data-src="files/src/ErrorHandlers/TriggerExceptionError.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Convert an uncaught exception into an PHP error.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">__invoke</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><abbr title="\Throwable">Throwable</abbr>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$exception</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
<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">
<span class="phpdocumentor-signature__argument__name">$exception</span>
: <span class="phpdocumentor-signature__argument__return-type"><abbr title="\Throwable">Throwable</abbr></span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>The exception</p>
</section>
</dd>
</dl>
</article>
</section>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/ErrorHandlers/TriggerExceptionError.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="classes/OCC-Basics-ErrorHandlers-TriggerExceptionError.html#toc-methods">Methods</a></li>
</ul>
</li>
<li class="phpdocumentor-on-this-page-section__title">Methods</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="classes/OCC-Basics-ErrorHandlers-TriggerExceptionError.html#method___invoke">__invoke()</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="classes/OCC-Basics-ErrorHandlers-TriggerExceptionError.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,621 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-InterfaceTraits.html" class="">InterfaceTraits</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ.html">OCC</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics.html">Basics</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics-interfacetraits.html">InterfaceTraits</a></li>
</ul>
<article class="phpdocumentor-element -trait">
<h2 class="phpdocumentor-content__title">
ArrayAccessTrait
</h2>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/InterfaceTraits/ArrayAccessTrait.php"><a href="files/src-interfacetraits-arrayaccesstrait.html"><abbr title="src/InterfaceTraits/ArrayAccessTrait.php">ArrayAccessTrait.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">42</span>
<a href="classes/OCC-Basics-InterfaceTraits-ArrayAccessTrait.html#source-view.42" class="phpdocumentor-element-found-in__source" data-line="42" data-modal="source-view" data-src="files/src/InterfaceTraits/ArrayAccessTrait.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">A generic implementation of the ArrayAccess interface.</p>
<section class="phpdocumentor-description"><p>Internally it accesses the protected <code class="prettyprint">$_data</code> array.</p>
</section>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/OCC-Basics-InterfaceTraits-ArrayAccessTrait.html#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">author</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<section class="phpdocumentor-description"><p>Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
</section>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">template</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<section class="phpdocumentor-description"><p>TValue of mixed</p>
</section>
</dd>
</dl>
<h3 id="toc">
Table of Contents
<a href="classes/OCC-Basics-InterfaceTraits-ArrayAccessTrait.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-methods">
Methods
<a href="classes/OCC-Basics-InterfaceTraits-ArrayAccessTrait.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/OCC-Basics-InterfaceTraits-ArrayAccessTrait.html#method_offsetExists">offsetExists()</a>
<span>
&nbsp;: 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-InterfaceTraits-ArrayAccessTrait.html#method_offsetGet">offsetGet()</a>
<span>
&nbsp;: <abbr title="\OCC\Basics\InterfaceTraits\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-InterfaceTraits-ArrayAccessTrait.html#method_offsetSet">offsetSet()</a>
<span>
&nbsp;: void </span>
</dt>
<dd>Assign a value to the specified offset.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/OCC-Basics-InterfaceTraits-ArrayAccessTrait.html#method_offsetUnset">offsetUnset()</a>
<span>
&nbsp;: void </span>
</dt>
<dd>Unset the specified offset.</dd>
</dl>
<section class="phpdocumentor-methods">
<h3 class="phpdocumentor-elements__header" id="methods">
Methods
<a href="classes/OCC-Basics-InterfaceTraits-ArrayAccessTrait.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_offsetExists">
offsetExists()
<a href="classes/OCC-Basics-InterfaceTraits-ArrayAccessTrait.html#method_offsetExists" 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/InterfaceTraits/ArrayAccessTrait.php"><a href="files/src-interfacetraits-arrayaccesstrait.html"><abbr title="src/InterfaceTraits/ArrayAccessTrait.php">ArrayAccessTrait.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">62</span>
<a href="classes/OCC-Basics-InterfaceTraits-ArrayAccessTrait.html#source-view.62" class="phpdocumentor-element-found-in__source" data-line="62" data-modal="source-view" data-src="files/src/InterfaceTraits/ArrayAccessTrait.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Check if the specified offset exists.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">offsetExists</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string|int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$offset</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</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">
<span class="phpdocumentor-signature__argument__name">$offset</span>
: <span class="phpdocumentor-signature__argument__return-type">string|int</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>The offset to check for</p>
</section>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">bool</span>
&mdash;
<section class="phpdocumentor-description"><p>Whether the offset exists</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_offsetGet">
offsetGet()
<a href="classes/OCC-Basics-InterfaceTraits-ArrayAccessTrait.html#method_offsetGet" 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/InterfaceTraits/ArrayAccessTrait.php"><a href="files/src-interfacetraits-arrayaccesstrait.html"><abbr title="src/InterfaceTraits/ArrayAccessTrait.php">ArrayAccessTrait.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">76</span>
<a href="classes/OCC-Basics-InterfaceTraits-ArrayAccessTrait.html#source-view.76" class="phpdocumentor-element-found-in__source" data-line="76" data-modal="source-view" data-src="files/src/InterfaceTraits/ArrayAccessTrait.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Retrieve data at the specified offset.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">offsetGet</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string|int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$offset</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><abbr title="\OCC\Basics\InterfaceTraits\TValue">TValue</abbr>|null</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">
<span class="phpdocumentor-signature__argument__name">$offset</span>
: <span class="phpdocumentor-signature__argument__return-type">string|int</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>The offset to retrieve</p>
</section>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type"><abbr title="\OCC\Basics\InterfaceTraits\TValue">TValue</abbr>|null</span>
&mdash;
<section class="phpdocumentor-description"><p>The value at the offset or NULL if invalid</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_offsetSet">
offsetSet()
<a href="classes/OCC-Basics-InterfaceTraits-ArrayAccessTrait.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/InterfaceTraits/ArrayAccessTrait.php"><a href="files/src-interfacetraits-arrayaccesstrait.html"><abbr title="src/InterfaceTraits/ArrayAccessTrait.php">ArrayAccessTrait.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">91</span>
<a href="classes/OCC-Basics-InterfaceTraits-ArrayAccessTrait.html#source-view.91" class="phpdocumentor-element-found-in__source" data-line="91" data-modal="source-view" data-src="files/src/InterfaceTraits/ArrayAccessTrait.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Assign a value to 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&nbsp;</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\InterfaceTraits\TValue">TValue</abbr>&nbsp;</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">
<span class="phpdocumentor-signature__argument__name">$offset</span>
: <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>
</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\InterfaceTraits\TValue">TValue</abbr></span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>The value to set</p>
</section>
</dd>
</dl>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_offsetUnset">
offsetUnset()
<a href="classes/OCC-Basics-InterfaceTraits-ArrayAccessTrait.html#method_offsetUnset" 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/InterfaceTraits/ArrayAccessTrait.php"><a href="files/src-interfacetraits-arrayaccesstrait.html"><abbr title="src/InterfaceTraits/ArrayAccessTrait.php">ArrayAccessTrait.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">109</span>
<a href="classes/OCC-Basics-InterfaceTraits-ArrayAccessTrait.html#source-view.109" class="phpdocumentor-element-found-in__source" data-line="109" data-modal="source-view" data-src="files/src/InterfaceTraits/ArrayAccessTrait.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Unset the specified offset.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">offsetUnset</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string|int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$offset</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">
<span class="phpdocumentor-signature__argument__name">$offset</span>
: <span class="phpdocumentor-signature__argument__return-type">string|int</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>The offset to unset</p>
</section>
</dd>
</dl>
</article>
</section>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/InterfaceTraits/ArrayAccessTrait.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="classes/OCC-Basics-InterfaceTraits-ArrayAccessTrait.html#toc-methods">Methods</a></li>
</ul>
</li>
<li class="phpdocumentor-on-this-page-section__title">Methods</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="classes/OCC-Basics-InterfaceTraits-ArrayAccessTrait.html#method_offsetExists">offsetExists()</a></li>
<li><a href="classes/OCC-Basics-InterfaceTraits-ArrayAccessTrait.html#method_offsetGet">offsetGet()</a></li>
<li><a href="classes/OCC-Basics-InterfaceTraits-ArrayAccessTrait.html#method_offsetSet">offsetSet()</a></li>
<li><a href="classes/OCC-Basics-InterfaceTraits-ArrayAccessTrait.html#method_offsetUnset">offsetUnset()</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="classes/OCC-Basics-InterfaceTraits-ArrayAccessTrait.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,427 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-InterfaceTraits.html" class="">InterfaceTraits</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ.html">OCC</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics.html">Basics</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics-interfacetraits.html">InterfaceTraits</a></li>
</ul>
<article class="phpdocumentor-element -trait">
<h2 class="phpdocumentor-content__title">
CountableTrait
</h2>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/InterfaceTraits/CountableTrait.php"><a href="files/src-interfacetraits-countabletrait.html"><abbr title="src/InterfaceTraits/CountableTrait.php">CountableTrait.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">42</span>
<a href="classes/OCC-Basics-InterfaceTraits-CountableTrait.html#source-view.42" class="phpdocumentor-element-found-in__source" data-line="42" data-modal="source-view" data-src="files/src/InterfaceTraits/CountableTrait.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">A generic implementation of the Countable interface.</p>
<section class="phpdocumentor-description"><p>Internally it counts the values of the protected <code class="prettyprint">$_data</code> array.</p>
</section>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/OCC-Basics-InterfaceTraits-CountableTrait.html#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">author</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<section class="phpdocumentor-description"><p>Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
</section>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">template</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<section class="phpdocumentor-description"><p>TValue of mixed</p>
</section>
</dd>
</dl>
<h3 id="toc">
Table of Contents
<a href="classes/OCC-Basics-InterfaceTraits-CountableTrait.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-methods">
Methods
<a href="classes/OCC-Basics-InterfaceTraits-CountableTrait.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/OCC-Basics-InterfaceTraits-CountableTrait.html#method_count">count()</a>
<span>
&nbsp;: int<0, max> </span>
</dt>
<dd>Count the data items.</dd>
</dl>
<section class="phpdocumentor-methods">
<h3 class="phpdocumentor-elements__header" id="methods">
Methods
<a href="classes/OCC-Basics-InterfaceTraits-CountableTrait.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_count">
count()
<a href="classes/OCC-Basics-InterfaceTraits-CountableTrait.html#method_count" 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/InterfaceTraits/CountableTrait.php"><a href="files/src-interfacetraits-countabletrait.html"><abbr title="src/InterfaceTraits/CountableTrait.php">CountableTrait.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">60</span>
<a href="classes/OCC-Basics-InterfaceTraits-CountableTrait.html#source-view.60" class="phpdocumentor-element-found-in__source" data-line="60" data-modal="source-view" data-src="files/src/InterfaceTraits/CountableTrait.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Count the data items.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">count</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int<0, max></span></code>
<div class="phpdocumentor-label-line">
<div class="phpdocumentor-label phpdocumentor-label--success"><span>API</span><span>Yes</span></div>
</div>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">int<0, max></span>
&mdash;
<section class="phpdocumentor-description"><p>The number of data items</p>
</section>
</section>
</article>
</section>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/InterfaceTraits/CountableTrait.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="classes/OCC-Basics-InterfaceTraits-CountableTrait.html#toc-methods">Methods</a></li>
</ul>
</li>
<li class="phpdocumentor-on-this-page-section__title">Methods</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="classes/OCC-Basics-InterfaceTraits-CountableTrait.html#method_count">count()</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="classes/OCC-Basics-InterfaceTraits-CountableTrait.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,427 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-InterfaceTraits.html" class="">InterfaceTraits</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ.html">OCC</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics.html">Basics</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics-interfacetraits.html">InterfaceTraits</a></li>
</ul>
<article class="phpdocumentor-element -trait">
<h2 class="phpdocumentor-content__title">
IteratorAggregateTrait
</h2>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/InterfaceTraits/IteratorAggregateTrait.php"><a href="files/src-interfacetraits-iteratoraggregatetrait.html"><abbr title="src/InterfaceTraits/IteratorAggregateTrait.php">IteratorAggregateTrait.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">43</span>
<a href="classes/OCC-Basics-InterfaceTraits-IteratorAggregateTrait.html#source-view.43" class="phpdocumentor-element-found-in__source" data-line="43" data-modal="source-view" data-src="files/src/InterfaceTraits/IteratorAggregateTrait.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">A generic implementation of the IteratorAggregate interface.</p>
<section class="phpdocumentor-description"><p>Internally it iterates over the protected <code class="prettyprint">$_data</code> array.</p>
</section>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/OCC-Basics-InterfaceTraits-IteratorAggregateTrait.html#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">author</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<section class="phpdocumentor-description"><p>Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
</section>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">template</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<section class="phpdocumentor-description"><p>TValue of mixed</p>
</section>
</dd>
</dl>
<h3 id="toc">
Table of Contents
<a href="classes/OCC-Basics-InterfaceTraits-IteratorAggregateTrait.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-methods">
Methods
<a href="classes/OCC-Basics-InterfaceTraits-IteratorAggregateTrait.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/OCC-Basics-InterfaceTraits-IteratorAggregateTrait.html#method_getIterator">getIterator()</a>
<span>
&nbsp;: <abbr title="\ArrayIterator">ArrayIterator</abbr>&lt;string|int, <abbr title="\OCC\Basics\InterfaceTraits\TValue">TValue</abbr>&gt; </span>
</dt>
<dd>Retrieve an external iterator.</dd>
</dl>
<section class="phpdocumentor-methods">
<h3 class="phpdocumentor-elements__header" id="methods">
Methods
<a href="classes/OCC-Basics-InterfaceTraits-IteratorAggregateTrait.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_getIterator">
getIterator()
<a href="classes/OCC-Basics-InterfaceTraits-IteratorAggregateTrait.html#method_getIterator" 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/InterfaceTraits/IteratorAggregateTrait.php"><a href="files/src-interfacetraits-iteratoraggregatetrait.html"><abbr title="src/InterfaceTraits/IteratorAggregateTrait.php">IteratorAggregateTrait.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">61</span>
<a href="classes/OCC-Basics-InterfaceTraits-IteratorAggregateTrait.html#source-view.61" class="phpdocumentor-element-found-in__source" data-line="61" data-modal="source-view" data-src="files/src/InterfaceTraits/IteratorAggregateTrait.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Retrieve an external iterator.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">getIterator</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><abbr title="\ArrayIterator">ArrayIterator</abbr>&lt;string|int, <abbr title="\OCC\Basics\InterfaceTraits\TValue">TValue</abbr>&gt;</span></code>
<div class="phpdocumentor-label-line">
<div class="phpdocumentor-label phpdocumentor-label--success"><span>API</span><span>Yes</span></div>
</div>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type"><abbr title="\ArrayIterator">ArrayIterator</abbr>&lt;string|int, <abbr title="\OCC\Basics\InterfaceTraits\TValue">TValue</abbr>&gt;</span>
&mdash;
<section class="phpdocumentor-description"><p>New iterator for the data array</p>
</section>
</section>
</article>
</section>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/InterfaceTraits/IteratorAggregateTrait.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="classes/OCC-Basics-InterfaceTraits-IteratorAggregateTrait.html#toc-methods">Methods</a></li>
</ul>
</li>
<li class="phpdocumentor-on-this-page-section__title">Methods</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="classes/OCC-Basics-InterfaceTraits-IteratorAggregateTrait.html#method_getIterator">getIterator()</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="classes/OCC-Basics-InterfaceTraits-IteratorAggregateTrait.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,658 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-InterfaceTraits.html" class="">InterfaceTraits</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ.html">OCC</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics.html">Basics</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics-interfacetraits.html">InterfaceTraits</a></li>
</ul>
<article class="phpdocumentor-element -trait">
<h2 class="phpdocumentor-content__title">
IteratorTrait
</h2>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/InterfaceTraits/IteratorTrait.php"><a href="files/src-interfacetraits-iteratortrait.html"><abbr title="src/InterfaceTraits/IteratorTrait.php">IteratorTrait.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">42</span>
<a href="classes/OCC-Basics-InterfaceTraits-IteratorTrait.html#source-view.42" class="phpdocumentor-element-found-in__source" data-line="42" data-modal="source-view" data-src="files/src/InterfaceTraits/IteratorTrait.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">A generic implementation of the Iterator interface.</p>
<section class="phpdocumentor-description"><p>Internally it iterates over the protected <code class="prettyprint">$_data</code> array.</p>
</section>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/OCC-Basics-InterfaceTraits-IteratorTrait.html#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">author</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<section class="phpdocumentor-description"><p>Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
</section>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">template</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<section class="phpdocumentor-description"><p>TValue of mixed</p>
</section>
</dd>
</dl>
<h3 id="toc">
Table of Contents
<a href="classes/OCC-Basics-InterfaceTraits-IteratorTrait.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-methods">
Methods
<a href="classes/OCC-Basics-InterfaceTraits-IteratorTrait.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/OCC-Basics-InterfaceTraits-IteratorTrait.html#method_current">current()</a>
<span>
&nbsp;: <abbr title="\OCC\Basics\InterfaceTraits\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-InterfaceTraits-IteratorTrait.html#method_key">key()</a>
<span>
&nbsp;: 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-InterfaceTraits-IteratorTrait.html#method_next">next()</a>
<span>
&nbsp;: void </span>
</dt>
<dd>Move forward to next item.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/OCC-Basics-InterfaceTraits-IteratorTrait.html#method_prev">prev()</a>
<span>
&nbsp;: void </span>
</dt>
<dd>Move back to previous item.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/OCC-Basics-InterfaceTraits-IteratorTrait.html#method_rewind">rewind()</a>
<span>
&nbsp;: 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-InterfaceTraits-IteratorTrait.html#method_valid">valid()</a>
<span>
&nbsp;: bool </span>
</dt>
<dd>Check if current position is valid.</dd>
</dl>
<section class="phpdocumentor-methods">
<h3 class="phpdocumentor-elements__header" id="methods">
Methods
<a href="classes/OCC-Basics-InterfaceTraits-IteratorTrait.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_current">
current()
<a href="classes/OCC-Basics-InterfaceTraits-IteratorTrait.html#method_current" 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/InterfaceTraits/IteratorTrait.php"><a href="files/src-interfacetraits-iteratortrait.html"><abbr title="src/InterfaceTraits/IteratorTrait.php">IteratorTrait.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">60</span>
<a href="classes/OCC-Basics-InterfaceTraits-IteratorTrait.html#source-view.60" class="phpdocumentor-element-found-in__source" data-line="60" data-modal="source-view" data-src="files/src/InterfaceTraits/IteratorTrait.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Return the current item.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">current</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><abbr title="\OCC\Basics\InterfaceTraits\TValue">TValue</abbr>|null</span></code>
<div class="phpdocumentor-label-line">
<div class="phpdocumentor-label phpdocumentor-label--success"><span>API</span><span>Yes</span></div>
</div>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type"><abbr title="\OCC\Basics\InterfaceTraits\TValue">TValue</abbr>|null</span>
&mdash;
<section class="phpdocumentor-description"><p>The current item or NULL if invalid</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_key">
key()
<a href="classes/OCC-Basics-InterfaceTraits-IteratorTrait.html#method_key" 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/InterfaceTraits/IteratorTrait.php"><a href="files/src-interfacetraits-iteratortrait.html"><abbr title="src/InterfaceTraits/IteratorTrait.php">IteratorTrait.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">76</span>
<a href="classes/OCC-Basics-InterfaceTraits-IteratorTrait.html#source-view.76" class="phpdocumentor-element-found-in__source" data-line="76" data-modal="source-view" data-src="files/src/InterfaceTraits/IteratorTrait.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Return the current key.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">key</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string|int|null</span></code>
<div class="phpdocumentor-label-line">
<div class="phpdocumentor-label phpdocumentor-label--success"><span>API</span><span>Yes</span></div>
</div>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">string|int|null</span>
&mdash;
<section class="phpdocumentor-description"><p>The current key or NULL if invalid</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_next">
next()
<a href="classes/OCC-Basics-InterfaceTraits-IteratorTrait.html#method_next" 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/InterfaceTraits/IteratorTrait.php"><a href="files/src-interfacetraits-iteratortrait.html"><abbr title="src/InterfaceTraits/IteratorTrait.php">IteratorTrait.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">88</span>
<a href="classes/OCC-Basics-InterfaceTraits-IteratorTrait.html#source-view.88" class="phpdocumentor-element-found-in__source" data-line="88" data-modal="source-view" data-src="files/src/InterfaceTraits/IteratorTrait.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Move forward to next item.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">next</span><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>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_prev">
prev()
<a href="classes/OCC-Basics-InterfaceTraits-IteratorTrait.html#method_prev" 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/InterfaceTraits/IteratorTrait.php"><a href="files/src-interfacetraits-iteratortrait.html"><abbr title="src/InterfaceTraits/IteratorTrait.php">IteratorTrait.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">100</span>
<a href="classes/OCC-Basics-InterfaceTraits-IteratorTrait.html#source-view.100" class="phpdocumentor-element-found-in__source" data-line="100" data-modal="source-view" data-src="files/src/InterfaceTraits/IteratorTrait.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Move back to previous item.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">prev</span><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>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_rewind">
rewind()
<a href="classes/OCC-Basics-InterfaceTraits-IteratorTrait.html#method_rewind" 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/InterfaceTraits/IteratorTrait.php"><a href="files/src-interfacetraits-iteratortrait.html"><abbr title="src/InterfaceTraits/IteratorTrait.php">IteratorTrait.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">112</span>
<a href="classes/OCC-Basics-InterfaceTraits-IteratorTrait.html#source-view.112" class="phpdocumentor-element-found-in__source" data-line="112" data-modal="source-view" data-src="files/src/InterfaceTraits/IteratorTrait.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Rewind the iterator to the first item.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">rewind</span><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>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_valid">
valid()
<a href="classes/OCC-Basics-InterfaceTraits-IteratorTrait.html#method_valid" 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/InterfaceTraits/IteratorTrait.php"><a href="files/src-interfacetraits-iteratortrait.html"><abbr title="src/InterfaceTraits/IteratorTrait.php">IteratorTrait.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">124</span>
<a href="classes/OCC-Basics-InterfaceTraits-IteratorTrait.html#source-view.124" class="phpdocumentor-element-found-in__source" data-line="124" data-modal="source-view" data-src="files/src/InterfaceTraits/IteratorTrait.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Check if current position is valid.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">valid</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
<div class="phpdocumentor-label-line">
<div class="phpdocumentor-label phpdocumentor-label--success"><span>API</span><span>Yes</span></div>
</div>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">bool</span>
&mdash;
<section class="phpdocumentor-description"><p>Whether the current position is valid</p>
</section>
</section>
</article>
</section>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/InterfaceTraits/IteratorTrait.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="classes/OCC-Basics-InterfaceTraits-IteratorTrait.html#toc-methods">Methods</a></li>
</ul>
</li>
<li class="phpdocumentor-on-this-page-section__title">Methods</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="classes/OCC-Basics-InterfaceTraits-IteratorTrait.html#method_current">current()</a></li>
<li><a href="classes/OCC-Basics-InterfaceTraits-IteratorTrait.html#method_key">key()</a></li>
<li><a href="classes/OCC-Basics-InterfaceTraits-IteratorTrait.html#method_next">next()</a></li>
<li><a href="classes/OCC-Basics-InterfaceTraits-IteratorTrait.html#method_prev">prev()</a></li>
<li><a href="classes/OCC-Basics-InterfaceTraits-IteratorTrait.html#method_rewind">rewind()</a></li>
<li><a href="classes/OCC-Basics-InterfaceTraits-IteratorTrait.html#method_valid">valid()</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="classes/OCC-Basics-InterfaceTraits-IteratorTrait.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,621 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ.html">OCC</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics.html">Basics</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics-interfaces.html">Interfaces</a></li>
</ul>
<article class="phpdocumentor-element -trait">
<h2 class="phpdocumentor-content__title">
ArrayAccessTrait
</h2>
<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>
:
<span class="phpdocumentor-element-found-in__line">42</span>
<a href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#source-view.42" class="phpdocumentor-element-found-in__source" data-line="42" data-modal="source-view" data-src="files/src/Interfaces/ArrayAccessTrait.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">A generic implementation of the ArrayAccess interface.</p>
<section class="phpdocumentor-description"><p>Internally it accesses the protected <code class="prettyprint">$_data</code> array.</p>
</section>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#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">author</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<section class="phpdocumentor-description"><p>Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
</section>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">template</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<section class="phpdocumentor-description"><p>TValue of mixed</p>
</section>
</dd>
</dl>
<h3 id="toc">
Table of Contents
<a href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-methods">
Methods
<a href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#method_offsetExists">offsetExists()</a>
<span>
&nbsp;: 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>
<span>
&nbsp;: <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>
<span>
&nbsp;: void </span>
</dt>
<dd>Assign a value to 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>
<span>
&nbsp;: void </span>
</dt>
<dd>Unset the specified offset.</dd>
</dl>
<section class="phpdocumentor-methods">
<h3 class="phpdocumentor-elements__header" id="methods">
Methods
<a href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_offsetExists">
offsetExists()
<a href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#method_offsetExists" 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>
:
<span class="phpdocumentor-element-found-in__line">62</span>
<a href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#source-view.62" class="phpdocumentor-element-found-in__source" data-line="62" data-modal="source-view" data-src="files/src/Interfaces/ArrayAccessTrait.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Check if the specified offset exists.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">offsetExists</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string|int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$offset</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</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">
<span class="phpdocumentor-signature__argument__name">$offset</span>
: <span class="phpdocumentor-signature__argument__return-type">string|int</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>The offset to check for</p>
</section>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">bool</span>
&mdash;
<section class="phpdocumentor-description"><p>Whether the offset exists</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_offsetGet">
offsetGet()
<a href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#method_offsetGet" 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>
:
<span class="phpdocumentor-element-found-in__line">76</span>
<a href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#source-view.76" class="phpdocumentor-element-found-in__source" data-line="76" data-modal="source-view" data-src="files/src/Interfaces/ArrayAccessTrait.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Retrieve data at the specified offset.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">offsetGet</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string|int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$offset</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><abbr title="\OCC\Basics\Interfaces\TValue">TValue</abbr>|null</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">
<span class="phpdocumentor-signature__argument__name">$offset</span>
: <span class="phpdocumentor-signature__argument__return-type">string|int</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>The offset to retrieve</p>
</section>
</dd>
</dl>
<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>
&mdash;
<section class="phpdocumentor-description"><p>The value at the offset or NULL if invalid</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<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>
</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>
:
<span class="phpdocumentor-element-found-in__line">91</span>
<a href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#source-view.91" class="phpdocumentor-element-found-in__source" data-line="91" data-modal="source-view" data-src="files/src/Interfaces/ArrayAccessTrait.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Assign a value to 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&nbsp;</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>&nbsp;</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">
<span class="phpdocumentor-signature__argument__name">$offset</span>
: <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>
</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>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>The value to set</p>
</section>
</dd>
</dl>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_offsetUnset">
offsetUnset()
<a href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#method_offsetUnset" 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>
:
<span class="phpdocumentor-element-found-in__line">109</span>
<a href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#source-view.109" class="phpdocumentor-element-found-in__source" data-line="109" data-modal="source-view" data-src="files/src/Interfaces/ArrayAccessTrait.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Unset the specified offset.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">offsetUnset</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string|int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$offset</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">
<span class="phpdocumentor-signature__argument__name">$offset</span>
: <span class="phpdocumentor-signature__argument__return-type">string|int</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>The offset to unset</p>
</section>
</dd>
</dl>
</article>
</section>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Interfaces/ArrayAccessTrait.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#toc-methods">Methods</a></li>
</ul>
</li>
<li class="phpdocumentor-on-this-page-section__title">Methods</li>
<li>
<ul class="phpdocumentor-list -clean">
<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>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,427 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ.html">OCC</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics.html">Basics</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics-interfaces.html">Interfaces</a></li>
</ul>
<article class="phpdocumentor-element -trait">
<h2 class="phpdocumentor-content__title">
CountableTrait
</h2>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Interfaces/CountableTrait.php"><a href="files/src-interfaces-countabletrait.html"><abbr title="src/Interfaces/CountableTrait.php">CountableTrait.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">42</span>
<a href="classes/OCC-Basics-Interfaces-CountableTrait.html#source-view.42" class="phpdocumentor-element-found-in__source" data-line="42" data-modal="source-view" data-src="files/src/Interfaces/CountableTrait.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">A generic implementation of the Countable interface.</p>
<section class="phpdocumentor-description"><p>Internally it counts the values of the protected <code class="prettyprint">$_data</code> array.</p>
</section>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/OCC-Basics-Interfaces-CountableTrait.html#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">author</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<section class="phpdocumentor-description"><p>Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
</section>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">template</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<section class="phpdocumentor-description"><p>TValue of mixed</p>
</section>
</dd>
</dl>
<h3 id="toc">
Table of Contents
<a href="classes/OCC-Basics-Interfaces-CountableTrait.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-methods">
Methods
<a href="classes/OCC-Basics-Interfaces-CountableTrait.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/OCC-Basics-Interfaces-CountableTrait.html#method_count">count()</a>
<span>
&nbsp;: int<0, max> </span>
</dt>
<dd>Count the data items.</dd>
</dl>
<section class="phpdocumentor-methods">
<h3 class="phpdocumentor-elements__header" id="methods">
Methods
<a href="classes/OCC-Basics-Interfaces-CountableTrait.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_count">
count()
<a href="classes/OCC-Basics-Interfaces-CountableTrait.html#method_count" 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/CountableTrait.php"><a href="files/src-interfaces-countabletrait.html"><abbr title="src/Interfaces/CountableTrait.php">CountableTrait.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">60</span>
<a href="classes/OCC-Basics-Interfaces-CountableTrait.html#source-view.60" class="phpdocumentor-element-found-in__source" data-line="60" data-modal="source-view" data-src="files/src/Interfaces/CountableTrait.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Count the data items.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">count</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int<0, max></span></code>
<div class="phpdocumentor-label-line">
<div class="phpdocumentor-label phpdocumentor-label--success"><span>API</span><span>Yes</span></div>
</div>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">int<0, max></span>
&mdash;
<section class="phpdocumentor-description"><p>The number of data items</p>
</section>
</section>
</article>
</section>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Interfaces/CountableTrait.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="classes/OCC-Basics-Interfaces-CountableTrait.html#toc-methods">Methods</a></li>
</ul>
</li>
<li class="phpdocumentor-on-this-page-section__title">Methods</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="classes/OCC-Basics-Interfaces-CountableTrait.html#method_count">count()</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="classes/OCC-Basics-Interfaces-CountableTrait.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,427 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ.html">OCC</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics.html">Basics</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics-interfaces.html">Interfaces</a></li>
</ul>
<article class="phpdocumentor-element -trait">
<h2 class="phpdocumentor-content__title">
IteratorAggregateTrait
</h2>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Interfaces/IteratorAggregateTrait.php"><a href="files/src-interfaces-iteratoraggregatetrait.html"><abbr title="src/Interfaces/IteratorAggregateTrait.php">IteratorAggregateTrait.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">43</span>
<a href="classes/OCC-Basics-Interfaces-IteratorAggregateTrait.html#source-view.43" class="phpdocumentor-element-found-in__source" data-line="43" data-modal="source-view" data-src="files/src/Interfaces/IteratorAggregateTrait.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">A generic implementation of the IteratorAggregate interface.</p>
<section class="phpdocumentor-description"><p>Internally it iterates over the protected <code class="prettyprint">$_data</code> array.</p>
</section>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/OCC-Basics-Interfaces-IteratorAggregateTrait.html#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">author</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<section class="phpdocumentor-description"><p>Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
</section>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">template</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<section class="phpdocumentor-description"><p>TValue of mixed</p>
</section>
</dd>
</dl>
<h3 id="toc">
Table of Contents
<a href="classes/OCC-Basics-Interfaces-IteratorAggregateTrait.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-methods">
Methods
<a href="classes/OCC-Basics-Interfaces-IteratorAggregateTrait.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/OCC-Basics-Interfaces-IteratorAggregateTrait.html#method_getIterator">getIterator()</a>
<span>
&nbsp;: <abbr title="\ArrayIterator">ArrayIterator</abbr>&lt;string|int, <abbr title="\OCC\Basics\Interfaces\TValue">TValue</abbr>&gt; </span>
</dt>
<dd>Retrieve an external iterator.</dd>
</dl>
<section class="phpdocumentor-methods">
<h3 class="phpdocumentor-elements__header" id="methods">
Methods
<a href="classes/OCC-Basics-Interfaces-IteratorAggregateTrait.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_getIterator">
getIterator()
<a href="classes/OCC-Basics-Interfaces-IteratorAggregateTrait.html#method_getIterator" 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/IteratorAggregateTrait.php"><a href="files/src-interfaces-iteratoraggregatetrait.html"><abbr title="src/Interfaces/IteratorAggregateTrait.php">IteratorAggregateTrait.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">61</span>
<a href="classes/OCC-Basics-Interfaces-IteratorAggregateTrait.html#source-view.61" class="phpdocumentor-element-found-in__source" data-line="61" data-modal="source-view" data-src="files/src/Interfaces/IteratorAggregateTrait.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Retrieve an external iterator.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">getIterator</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><abbr title="\ArrayIterator">ArrayIterator</abbr>&lt;string|int, <abbr title="\OCC\Basics\Interfaces\TValue">TValue</abbr>&gt;</span></code>
<div class="phpdocumentor-label-line">
<div class="phpdocumentor-label phpdocumentor-label--success"><span>API</span><span>Yes</span></div>
</div>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type"><abbr title="\ArrayIterator">ArrayIterator</abbr>&lt;string|int, <abbr title="\OCC\Basics\Interfaces\TValue">TValue</abbr>&gt;</span>
&mdash;
<section class="phpdocumentor-description"><p>New iterator for the data array</p>
</section>
</section>
</article>
</section>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Interfaces/IteratorAggregateTrait.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="classes/OCC-Basics-Interfaces-IteratorAggregateTrait.html#toc-methods">Methods</a></li>
</ul>
</li>
<li class="phpdocumentor-on-this-page-section__title">Methods</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="classes/OCC-Basics-Interfaces-IteratorAggregateTrait.html#method_getIterator">getIterator()</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="classes/OCC-Basics-Interfaces-IteratorAggregateTrait.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,658 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ.html">OCC</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics.html">Basics</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics-interfaces.html">Interfaces</a></li>
</ul>
<article class="phpdocumentor-element -trait">
<h2 class="phpdocumentor-content__title">
IteratorTrait
</h2>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Interfaces/IteratorTrait.php"><a href="files/src-interfaces-iteratortrait.html"><abbr title="src/Interfaces/IteratorTrait.php">IteratorTrait.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">42</span>
<a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#source-view.42" class="phpdocumentor-element-found-in__source" data-line="42" data-modal="source-view" data-src="files/src/Interfaces/IteratorTrait.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">A generic implementation of the Iterator interface.</p>
<section class="phpdocumentor-description"><p>Internally it iterates over the protected <code class="prettyprint">$_data</code> array.</p>
</section>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#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">author</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<section class="phpdocumentor-description"><p>Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
</section>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">template</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<section class="phpdocumentor-description"><p>TValue of mixed</p>
</section>
</dd>
</dl>
<h3 id="toc">
Table of Contents
<a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-methods">
Methods
<a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_current">current()</a>
<span>
&nbsp;: <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-Interfaces-IteratorTrait.html#method_key">key()</a>
<span>
&nbsp;: 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>
<span>
&nbsp;: 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-IteratorTrait.html#method_prev">prev()</a>
<span>
&nbsp;: void </span>
</dt>
<dd>Move back to previous item.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_rewind">rewind()</a>
<span>
&nbsp;: 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-Interfaces-IteratorTrait.html#method_valid">valid()</a>
<span>
&nbsp;: bool </span>
</dt>
<dd>Check if current position is valid.</dd>
</dl>
<section class="phpdocumentor-methods">
<h3 class="phpdocumentor-elements__header" id="methods">
Methods
<a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_current">
current()
<a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_current" 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/IteratorTrait.php"><a href="files/src-interfaces-iteratortrait.html"><abbr title="src/Interfaces/IteratorTrait.php">IteratorTrait.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">60</span>
<a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#source-view.60" class="phpdocumentor-element-found-in__source" data-line="60" data-modal="source-view" data-src="files/src/Interfaces/IteratorTrait.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Return the current item.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">current</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><abbr title="\OCC\Basics\Interfaces\TValue">TValue</abbr>|null</span></code>
<div class="phpdocumentor-label-line">
<div class="phpdocumentor-label phpdocumentor-label--success"><span>API</span><span>Yes</span></div>
</div>
<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>
&mdash;
<section class="phpdocumentor-description"><p>The current item or NULL if invalid</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_key">
key()
<a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_key" 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/IteratorTrait.php"><a href="files/src-interfaces-iteratortrait.html"><abbr title="src/Interfaces/IteratorTrait.php">IteratorTrait.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">76</span>
<a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#source-view.76" class="phpdocumentor-element-found-in__source" data-line="76" data-modal="source-view" data-src="files/src/Interfaces/IteratorTrait.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Return the current key.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">key</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string|int|null</span></code>
<div class="phpdocumentor-label-line">
<div class="phpdocumentor-label phpdocumentor-label--success"><span>API</span><span>Yes</span></div>
</div>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">string|int|null</span>
&mdash;
<section class="phpdocumentor-description"><p>The current key or NULL if invalid</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_next">
next()
<a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_next" 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/IteratorTrait.php"><a href="files/src-interfaces-iteratortrait.html"><abbr title="src/Interfaces/IteratorTrait.php">IteratorTrait.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">88</span>
<a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#source-view.88" class="phpdocumentor-element-found-in__source" data-line="88" data-modal="source-view" data-src="files/src/Interfaces/IteratorTrait.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Move forward to next item.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">next</span><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>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_prev">
prev()
<a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_prev" 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/IteratorTrait.php"><a href="files/src-interfaces-iteratortrait.html"><abbr title="src/Interfaces/IteratorTrait.php">IteratorTrait.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">100</span>
<a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#source-view.100" class="phpdocumentor-element-found-in__source" data-line="100" data-modal="source-view" data-src="files/src/Interfaces/IteratorTrait.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Move back to previous item.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">prev</span><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>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_rewind">
rewind()
<a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_rewind" 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/IteratorTrait.php"><a href="files/src-interfaces-iteratortrait.html"><abbr title="src/Interfaces/IteratorTrait.php">IteratorTrait.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">112</span>
<a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#source-view.112" class="phpdocumentor-element-found-in__source" data-line="112" data-modal="source-view" data-src="files/src/Interfaces/IteratorTrait.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Rewind the iterator to the first item.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">rewind</span><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>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_valid">
valid()
<a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_valid" 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/IteratorTrait.php"><a href="files/src-interfaces-iteratortrait.html"><abbr title="src/Interfaces/IteratorTrait.php">IteratorTrait.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">124</span>
<a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#source-view.124" class="phpdocumentor-element-found-in__source" data-line="124" data-modal="source-view" data-src="files/src/Interfaces/IteratorTrait.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Check if current position is valid.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">valid</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
<div class="phpdocumentor-label-line">
<div class="phpdocumentor-label phpdocumentor-label--success"><span>API</span><span>Yes</span></div>
</div>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">bool</span>
&mdash;
<section class="phpdocumentor-description"><p>Whether the current position is valid</p>
</section>
</section>
</article>
</section>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Interfaces/IteratorTrait.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#toc-methods">Methods</a></li>
</ul>
</li>
<li class="phpdocumentor-on-this-page-section__title">Methods</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_current">current()</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-IteratorTrait.html#method_prev">prev()</a></li>
<li><a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_rewind">rewind()</a></li>
<li><a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#method_valid">valid()</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="classes/OCC-Basics-Interfaces-IteratorTrait.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,514 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ.html">OCC</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics.html">Basics</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics-traits.html">Traits</a></li>
</ul>
<article class="phpdocumentor-element -trait">
<h2 class="phpdocumentor-content__title">
Getter
</h2>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Traits/Getter.php"><a href="files/src-traits-getter.html"><abbr title="src/Traits/Getter.php">Getter.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">43</span>
<a href="classes/OCC-Basics-Traits-Getter.html#source-view.43" class="phpdocumentor-element-found-in__source" data-line="43" data-modal="source-view" data-src="files/src/Traits/Getter.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Reads data from inaccessible properties by using magic methods.</p>
<section class="phpdocumentor-description"><p>To make a <code class="prettyprint">protected</code> or <code class="prettyprint">private</code> property readable, provide a method named
<code class="prettyprint">_magicGet{Property}()</code> which handles the reading. Replace <code class="prettyprint">{Property}</code> in
the method's name with the name of the actual property (with an uppercase
first letter).</p>
<blockquote>
<p>Example: If the property is named <code class="prettyprint">$fooBar</code>, the &quot;magic&quot; method has to be
<code class="prettyprint">_magicGetFooBar()</code>. This method is then called when <code class="prettyprint">$fooBar</code> is read in
a context where it normally would not be accessible.</p>
</blockquote>
</section>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/OCC-Basics-Traits-Getter.html#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">author</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<section class="phpdocumentor-description"><p>Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
</section>
</dd>
</dl>
<h3 id="toc">
Table of Contents
<a href="classes/OCC-Basics-Traits-Getter.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-methods">
Methods
<a href="classes/OCC-Basics-Traits-Getter.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/OCC-Basics-Traits-Getter.html#method___get">__get()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Read data from an inaccessible property.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/OCC-Basics-Traits-Getter.html#method___isset">__isset()</a>
<span>
&nbsp;: bool </span>
</dt>
<dd>Check if an inaccessible property is set and not empty.</dd>
</dl>
<section class="phpdocumentor-methods">
<h3 class="phpdocumentor-elements__header" id="methods">
Methods
<a href="classes/OCC-Basics-Traits-Getter.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method___get">
__get()
<a href="classes/OCC-Basics-Traits-Getter.html#method___get" 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/Traits/Getter.php"><a href="files/src-traits-getter.html"><abbr title="src/Traits/Getter.php">Getter.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">54</span>
<a href="classes/OCC-Basics-Traits-Getter.html#source-view.54" class="phpdocumentor-element-found-in__source" data-line="54" data-modal="source-view" data-src="files/src/Traits/Getter.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Read data from an inaccessible property.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">__get</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$property</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
<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">
<span class="phpdocumentor-signature__argument__name">$property</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>The class property to get</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/OCC-Basics-Traits-Getter.html#method___get#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"><abbr title="\InvalidArgumentException">InvalidArgumentException</abbr></span>
<section class="phpdocumentor-description"><p>if the property or getter method do not exist</p>
</section>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">mixed</span>
&mdash;
<section class="phpdocumentor-description"><p>The class property's current value</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method___isset">
__isset()
<a href="classes/OCC-Basics-Traits-Getter.html#method___isset" 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/Traits/Getter.php"><a href="files/src-traits-getter.html"><abbr title="src/Traits/Getter.php">Getter.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">77</span>
<a href="classes/OCC-Basics-Traits-Getter.html#source-view.77" class="phpdocumentor-element-found-in__source" data-line="77" data-modal="source-view" data-src="files/src/Traits/Getter.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Check if an inaccessible property is set and not empty.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">__isset</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$property</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
<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">
<span class="phpdocumentor-signature__argument__name">$property</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>The class property to check</p>
</section>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">bool</span>
&mdash;
<section class="phpdocumentor-description"><p>Whether the class property is set and not empty</p>
</section>
</section>
</article>
</section>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Traits/Getter.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="classes/OCC-Basics-Traits-Getter.html#toc-methods">Methods</a></li>
</ul>
</li>
<li class="phpdocumentor-on-this-page-section__title">Methods</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="classes/OCC-Basics-Traits-Getter.html#method___get">__get()</a></li>
<li><a href="classes/OCC-Basics-Traits-Getter.html#method___isset">__isset()</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="classes/OCC-Basics-Traits-Getter.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,493 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ.html">OCC</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics.html">Basics</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics-traits.html">Traits</a></li>
</ul>
<article class="phpdocumentor-element -trait">
<h2 class="phpdocumentor-content__title">
OverloadingGetter
</h2>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Traits/OverloadingGetter.php"><a href="files/src-traits-overloadinggetter.html"><abbr title="src/Traits/OverloadingGetter.php">OverloadingGetter.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">37</span>
<a href="classes/OCC-Basics-Traits-OverloadingGetter.html#source-view.37" class="phpdocumentor-element-found-in__source" data-line="37" data-modal="source-view" data-src="files/src/Traits/OverloadingGetter.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Overloads a class with readable magic properties.</p>
<section class="phpdocumentor-description"><p>Internally it reads the protected <code class="prettyprint">$_data</code> array whose keys are interpreted
as property names.</p>
<blockquote>
<p>Example: Reading <code class="prettyprint">Foo-&gt;bar</code> will return the value of <code class="prettyprint">$_data['bar']</code>.</p>
</blockquote>
</section>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/OCC-Basics-Traits-OverloadingGetter.html#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">author</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<section class="phpdocumentor-description"><p>Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
</section>
</dd>
</dl>
<h3 id="toc">
Table of Contents
<a href="classes/OCC-Basics-Traits-OverloadingGetter.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-methods">
Methods
<a href="classes/OCC-Basics-Traits-OverloadingGetter.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/OCC-Basics-Traits-OverloadingGetter.html#method___get">__get()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Read data from an overloaded property.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/OCC-Basics-Traits-OverloadingGetter.html#method___isset">__isset()</a>
<span>
&nbsp;: bool </span>
</dt>
<dd>Check if an overloaded property is set and not empty.</dd>
</dl>
<section class="phpdocumentor-methods">
<h3 class="phpdocumentor-elements__header" id="methods">
Methods
<a href="classes/OCC-Basics-Traits-OverloadingGetter.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method___get">
__get()
<a href="classes/OCC-Basics-Traits-OverloadingGetter.html#method___get" 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/Traits/OverloadingGetter.php"><a href="files/src-traits-overloadinggetter.html"><abbr title="src/Traits/OverloadingGetter.php">OverloadingGetter.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">55</span>
<a href="classes/OCC-Basics-Traits-OverloadingGetter.html#source-view.55" class="phpdocumentor-element-found-in__source" data-line="55" data-modal="source-view" data-src="files/src/Traits/OverloadingGetter.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Read data from an overloaded property.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">__get</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$property</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
<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">
<span class="phpdocumentor-signature__argument__name">$property</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>The class property to get</p>
</section>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">mixed</span>
&mdash;
<section class="phpdocumentor-description"><p>The property's current value or NULL if not set</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method___isset">
__isset()
<a href="classes/OCC-Basics-Traits-OverloadingGetter.html#method___isset" 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/Traits/OverloadingGetter.php"><a href="files/src-traits-overloadinggetter.html"><abbr title="src/Traits/OverloadingGetter.php">OverloadingGetter.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">67</span>
<a href="classes/OCC-Basics-Traits-OverloadingGetter.html#source-view.67" class="phpdocumentor-element-found-in__source" data-line="67" data-modal="source-view" data-src="files/src/Traits/OverloadingGetter.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Check if an overloaded property is set and not empty.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">__isset</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$property</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
<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">
<span class="phpdocumentor-signature__argument__name">$property</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>The class property to check</p>
</section>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">bool</span>
&mdash;
<section class="phpdocumentor-description"><p>Whether the class property is set and not empty</p>
</section>
</section>
</article>
</section>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Traits/OverloadingGetter.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="classes/OCC-Basics-Traits-OverloadingGetter.html#toc-methods">Methods</a></li>
</ul>
</li>
<li class="phpdocumentor-on-this-page-section__title">Methods</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="classes/OCC-Basics-Traits-OverloadingGetter.html#method___get">__get()</a></li>
<li><a href="classes/OCC-Basics-Traits-OverloadingGetter.html#method___isset">__isset()</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="classes/OCC-Basics-Traits-OverloadingGetter.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,486 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ.html">OCC</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics.html">Basics</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics-traits.html">Traits</a></li>
</ul>
<article class="phpdocumentor-element -trait">
<h2 class="phpdocumentor-content__title">
OverloadingSetter
</h2>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Traits/OverloadingSetter.php"><a href="files/src-traits-overloadingsetter.html"><abbr title="src/Traits/OverloadingSetter.php">OverloadingSetter.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">37</span>
<a href="classes/OCC-Basics-Traits-OverloadingSetter.html#source-view.37" class="phpdocumentor-element-found-in__source" data-line="37" data-modal="source-view" data-src="files/src/Traits/OverloadingSetter.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Overloads a class with writable magic properties.</p>
<section class="phpdocumentor-description"><p>Internally it writes the protected <code class="prettyprint">$_data</code> array whose keys are interpreted
as property names.</p>
<blockquote>
<p>Example: <code class="prettyprint">Foo-&gt;bar = 42;</code> will set <code class="prettyprint">$_data['bar']</code> to <code class="prettyprint">42</code>.</p>
</blockquote>
</section>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/OCC-Basics-Traits-OverloadingSetter.html#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">author</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<section class="phpdocumentor-description"><p>Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
</section>
</dd>
</dl>
<h3 id="toc">
Table of Contents
<a href="classes/OCC-Basics-Traits-OverloadingSetter.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-methods">
Methods
<a href="classes/OCC-Basics-Traits-OverloadingSetter.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/OCC-Basics-Traits-OverloadingSetter.html#method___set">__set()</a>
<span>
&nbsp;: void </span>
</dt>
<dd>Write data to an overloaded property.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/OCC-Basics-Traits-OverloadingSetter.html#method___unset">__unset()</a>
<span>
&nbsp;: void </span>
</dt>
<dd>Unset an overloaded property.</dd>
</dl>
<section class="phpdocumentor-methods">
<h3 class="phpdocumentor-elements__header" id="methods">
Methods
<a href="classes/OCC-Basics-Traits-OverloadingSetter.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method___set">
__set()
<a href="classes/OCC-Basics-Traits-OverloadingSetter.html#method___set" 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/Traits/OverloadingSetter.php"><a href="files/src-traits-overloadingsetter.html"><abbr title="src/Traits/OverloadingSetter.php">OverloadingSetter.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">56</span>
<a href="classes/OCC-Basics-Traits-OverloadingSetter.html#source-view.56" class="phpdocumentor-element-found-in__source" data-line="56" data-modal="source-view" data-src="files/src/Traits/OverloadingSetter.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Write data to an overloaded property.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">__set</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$property</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</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>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$property</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>The class property to 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">mixed</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>The new value of the property</p>
</section>
</dd>
</dl>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method___unset">
__unset()
<a href="classes/OCC-Basics-Traits-OverloadingSetter.html#method___unset" 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/Traits/OverloadingSetter.php"><a href="files/src-traits-overloadingsetter.html"><abbr title="src/Traits/OverloadingSetter.php">OverloadingSetter.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">68</span>
<a href="classes/OCC-Basics-Traits-OverloadingSetter.html#source-view.68" class="phpdocumentor-element-found-in__source" data-line="68" data-modal="source-view" data-src="files/src/Traits/OverloadingSetter.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Unset an overloaded property.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">__unset</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$property</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
<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">
<span class="phpdocumentor-signature__argument__name">$property</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>The class property to unset</p>
</section>
</dd>
</dl>
</article>
</section>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Traits/OverloadingSetter.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="classes/OCC-Basics-Traits-OverloadingSetter.html#toc-methods">Methods</a></li>
</ul>
</li>
<li class="phpdocumentor-on-this-page-section__title">Methods</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="classes/OCC-Basics-Traits-OverloadingSetter.html#method___set">__set()</a></li>
<li><a href="classes/OCC-Basics-Traits-OverloadingSetter.html#method___unset">__unset()</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="classes/OCC-Basics-Traits-OverloadingSetter.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,507 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ.html">OCC</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics.html">Basics</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics-traits.html">Traits</a></li>
</ul>
<article class="phpdocumentor-element -trait">
<h2 class="phpdocumentor-content__title">
Setter
</h2>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Traits/Setter.php"><a href="files/src-traits-setter.html"><abbr title="src/Traits/Setter.php">Setter.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">43</span>
<a href="classes/OCC-Basics-Traits-Setter.html#source-view.43" class="phpdocumentor-element-found-in__source" data-line="43" data-modal="source-view" data-src="files/src/Traits/Setter.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Writes data to inaccessible properties by using magic methods.</p>
<section class="phpdocumentor-description"><p>To make a <code class="prettyprint">protected</code> or <code class="prettyprint">private</code> property writable, provide a method named
<code class="prettyprint">_magicSet{Property}()</code> which handles the writing. Replace <code class="prettyprint">{Property}</code> in
the method's name with the name of the actual property (with an uppercase
first letter).</p>
<blockquote>
<p>Example: If the property is named <code class="prettyprint">$fooBar</code>, the &quot;magic&quot; method has to be
<code class="prettyprint">_magicSetFooBar()</code>. This method is then called when <code class="prettyprint">$fooBar</code> is written
to in a context where it normally would not be accessible.</p>
</blockquote>
</section>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/OCC-Basics-Traits-Setter.html#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">author</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<section class="phpdocumentor-description"><p>Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
</section>
</dd>
</dl>
<h3 id="toc">
Table of Contents
<a href="classes/OCC-Basics-Traits-Setter.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-methods">
Methods
<a href="classes/OCC-Basics-Traits-Setter.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/OCC-Basics-Traits-Setter.html#method___set">__set()</a>
<span>
&nbsp;: void </span>
</dt>
<dd>Write data to an inaccessible property.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/OCC-Basics-Traits-Setter.html#method___unset">__unset()</a>
<span>
&nbsp;: void </span>
</dt>
<dd>Unset an inaccessible property.</dd>
</dl>
<section class="phpdocumentor-methods">
<h3 class="phpdocumentor-elements__header" id="methods">
Methods
<a href="classes/OCC-Basics-Traits-Setter.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method___set">
__set()
<a href="classes/OCC-Basics-Traits-Setter.html#method___set" 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/Traits/Setter.php"><a href="files/src-traits-setter.html"><abbr title="src/Traits/Setter.php">Setter.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">55</span>
<a href="classes/OCC-Basics-Traits-Setter.html#source-view.55" class="phpdocumentor-element-found-in__source" data-line="55" data-modal="source-view" data-src="files/src/Traits/Setter.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Write data to an inaccessible property.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">__set</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$property</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</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>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$property</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>The class property to 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">mixed</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>The new value of the property</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/OCC-Basics-Traits-Setter.html#method___set#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"><abbr title="\InvalidArgumentException">InvalidArgumentException</abbr></span>
<section class="phpdocumentor-description"><p>if the property or setter method do not exist</p>
</section>
</dd>
</dl>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method___unset">
__unset()
<a href="classes/OCC-Basics-Traits-Setter.html#method___unset" 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/Traits/Setter.php"><a href="files/src-traits-setter.html"><abbr title="src/Traits/Setter.php">Setter.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">78</span>
<a href="classes/OCC-Basics-Traits-Setter.html#source-view.78" class="phpdocumentor-element-found-in__source" data-line="78" data-modal="source-view" data-src="files/src/Traits/Setter.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Unset an inaccessible property.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">__unset</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$property</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
<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">
<span class="phpdocumentor-signature__argument__name">$property</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>The class property to unset</p>
</section>
</dd>
</dl>
</article>
</section>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Traits/Setter.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="classes/OCC-Basics-Traits-Setter.html#toc-methods">Methods</a></li>
</ul>
</li>
<li class="phpdocumentor-on-this-page-section__title">Methods</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="classes/OCC-Basics-Traits-Setter.html#method___set">__set()</a></li>
<li><a href="classes/OCC-Basics-Traits-Setter.html#method___unset">__unset()</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="classes/OCC-Basics-Traits-Setter.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,551 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ.html">OCC</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics.html">Basics</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics-traits.html">Traits</a></li>
</ul>
<article class="phpdocumentor-element -trait">
<h2 class="phpdocumentor-content__title">
Singleton
</h2>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Traits/Singleton.php"><a href="files/src-traits-singleton.html"><abbr title="src/Traits/Singleton.php">Singleton.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">43</span>
<a href="classes/OCC-Basics-Traits-Singleton.html#source-view.43" class="phpdocumentor-element-found-in__source" data-line="43" data-modal="source-view" data-src="files/src/Traits/Singleton.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Allows just a single instance of the class using this trait.</p>
<section class="phpdocumentor-description"><p>Get the singleton by calling the static method <code class="prettyprint">getInstance()</code>.</p>
<p>If there is no object yet, the constructor is called with the same arguments
as <code class="prettyprint">getInstance()</code>. Any later call will just return the already instantiated
object (irrespective of the given arguments).</p>
<p>In order for this to work as expected, the constructor has to be implemented
as <code class="prettyprint">private</code> to prevent direct instantiation of the class.</p>
</section>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/OCC-Basics-Traits-Singleton.html#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">author</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<section class="phpdocumentor-description"><p>Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
</section>
</dd>
</dl>
<h3 id="toc">
Table of Contents
<a href="classes/OCC-Basics-Traits-Singleton.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-methods">
Methods
<a href="classes/OCC-Basics-Traits-Singleton.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/OCC-Basics-Traits-Singleton.html#method___clone">__clone()</a>
<span>
&nbsp;: void </span>
</dt>
<dd>This is a singleton class, thus cloning is prohibited.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/OCC-Basics-Traits-Singleton.html#method_getInstance">getInstance()</a>
<span>
&nbsp;: static </span>
</dt>
<dd>Get a singleton instance of this class.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -private">
<a href="classes/OCC-Basics-Traits-Singleton.html#method___construct">__construct()</a>
<span>
&nbsp;: void </span>
</dt>
<dd>This is a singleton class, thus the constructor is private.</dd>
</dl>
<section class="phpdocumentor-methods">
<h3 class="phpdocumentor-elements__header" id="methods">
Methods
<a href="classes/OCC-Basics-Traits-Singleton.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<article
class="phpdocumentor-element
-method
-public
-final "
>
<h4 class="phpdocumentor-element__name" id="method___clone">
__clone()
<a href="classes/OCC-Basics-Traits-Singleton.html#method___clone" 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/Traits/Singleton.php"><a href="files/src-traits-singleton.html"><abbr title="src/Traits/Singleton.php">Singleton.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">87</span>
<a href="classes/OCC-Basics-Traits-Singleton.html#source-view.87" class="phpdocumentor-element-found-in__source" data-line="87" data-modal="source-view" data-src="files/src/Traits/Singleton.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">This is a singleton class, thus cloning is prohibited.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__final">final</span> <span class="phpdocumentor-signature__name">__clone</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
<div class="phpdocumentor-label-line">
</div>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/OCC-Basics-Traits-Singleton.html#method___clone#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"><abbr title="\LogicException">LogicException</abbr></span>
<section class="phpdocumentor-description"><p>when trying to clone the singleton object</p>
</section>
</dd>
</dl>
</article>
<article
class="phpdocumentor-element
-method
-public
-static -final "
>
<h4 class="phpdocumentor-element__name" id="method_getInstance">
getInstance()
<a href="classes/OCC-Basics-Traits-Singleton.html#method_getInstance" 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/Traits/Singleton.php"><a href="files/src-traits-singleton.html"><abbr title="src/Traits/Singleton.php">Singleton.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">63</span>
<a href="classes/OCC-Basics-Traits-Singleton.html#source-view.63" class="phpdocumentor-element-found-in__source" data-line="63" data-modal="source-view" data-src="files/src/Traits/Singleton.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Get a singleton instance of this class.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__final">final</span> <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">getInstance</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</span><span class="phpdocumentor-signature__argument__variadic-operator">...</span><span class="phpdocumentor-signature__argument__name">$args</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">static</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">
<span class="phpdocumentor-signature__argument__name">$args</span>
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Constructor arguments</p>
</section>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">static</span>
&mdash;
<section class="phpdocumentor-description"><p>The singleton instance</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-private
-abstract "
>
<h4 class="phpdocumentor-element__name" id="method___construct">
__construct()
<a href="classes/OCC-Basics-Traits-Singleton.html#method___construct" 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/Traits/Singleton.php"><a href="files/src-traits-singleton.html"><abbr title="src/Traits/Singleton.php">Singleton.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">78</span>
<a href="classes/OCC-Basics-Traits-Singleton.html#source-view.78" class="phpdocumentor-element-found-in__source" data-line="78" data-modal="source-view" data-src="files/src/Traits/Singleton.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">This is a singleton class, thus the constructor is private.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">private</span>
<span class="phpdocumentor-signature__abstract">abstract</span> <span class="phpdocumentor-signature__name">__construct</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
<div class="phpdocumentor-label-line">
</div>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/OCC-Basics-Traits-Singleton.html#method___construct#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">see</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/OCC-Basics-Traits-Singleton.html#method_getInstance"><abbr title="\OCC\Basics\Traits\Singleton::getInstance()">Singleton::getInstance()</abbr></a></span>
<section class="phpdocumentor-description"><p>to get an singleton object of the class</p>
</section>
</dd>
</dl>
</article>
</section>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Traits/Singleton.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="classes/OCC-Basics-Traits-Singleton.html#toc-methods">Methods</a></li>
</ul>
</li>
<li class="phpdocumentor-on-this-page-section__title">Methods</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="classes/OCC-Basics-Traits-Singleton.html#method___clone">__clone()</a></li>
<li><a href="classes/OCC-Basics-Traits-Singleton.html#method_getInstance">getInstance()</a></li>
<li><a href="classes/OCC-Basics-Traits-Singleton.html#method___construct">__construct()</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="classes/OCC-Basics-Traits-Singleton.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

1231
doc/css/base.css Normal file

File diff suppressed because it is too large Load Diff

427
doc/css/normalize.css vendored Normal file
View File

@ -0,0 +1,427 @@
/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
/**
* 1. Set default font family to sans-serif.
* 2. Prevent iOS text size adjust after orientation change, without disabling
* user zoom.
*/
html {
font-family: sans-serif; /* 1 */
-ms-text-size-adjust: 100%; /* 2 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/**
* Remove default margin.
*/
body {
margin: 0;
}
/* HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined for any HTML5 element in IE 8/9.
* Correct `block` display not defined for `details` or `summary` in IE 10/11
* and Firefox.
* Correct `block` display not defined for `main` in IE 11.
*/
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
display: block;
}
/**
* 1. Correct `inline-block` display not defined in IE 8/9.
* 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
*/
audio,
canvas,
progress,
video {
display: inline-block; /* 1 */
vertical-align: baseline; /* 2 */
}
/**
* Prevent modern browsers from displaying `audio` without controls.
* Remove excess height in iOS 5 devices.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Address `[hidden]` styling not present in IE 8/9/10.
* Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
*/
[hidden],
template {
display: none !important;
}
/* Links
========================================================================== */
/**
* Remove the gray background color from active links in IE 10.
*/
a {
background-color: transparent;
}
/**
* Improve readability when focused and also mouse hovered in all browsers.
*/
a:active,
a:hover {
outline: 0;
}
/* Text-level semantics
========================================================================== */
/**
* Address styling not present in IE 8/9/10/11, Safari, and Chrome.
*/
abbr[title] {
border-bottom: 1px dotted;
}
/**
* Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
*/
b,
strong {
font-weight: bold;
}
/**
* Address styling not present in Safari and Chrome.
*/
dfn {
font-style: italic;
}
/**
* Address variable `h1` font-size and margin within `section` and `article`
* contexts in Firefox 4+, Safari, and Chrome.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/**
* Address styling not present in IE 8/9.
*/
mark {
background: #ff0;
color: #000;
}
/**
* Address inconsistent and variable font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
/* Embedded content
========================================================================== */
/**
* Remove border when inside `a` element in IE 8/9/10.
*/
img {
border: 0;
}
/**
* Correct overflow not hidden in IE 9/10/11.
*/
svg:not(:root) {
overflow: hidden;
}
/* Grouping content
========================================================================== */
/**
* Address margin not present in IE 8/9 and Safari.
*/
figure {
margin: 1em 40px;
}
/**
* Address differences between Firefox and other browsers.
*/
hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
/**
* Contain overflow in all browsers.
*/
pre {
overflow: auto;
}
/**
* Address odd `em`-unit font size rendering in all browsers.
*/
code,
kbd,
pre,
samp {
font-family: var(--font-monospace);
font-size: 1em;
}
/* Forms
========================================================================== */
/**
* Known limitation: by default, Chrome and Safari on OS X allow very limited
* styling of `select`, unless a `border` property is set.
*/
/**
* 1. Correct color not being inherited.
* Known issue: affects color of disabled elements.
* 2. Correct font properties not being inherited.
* 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
*/
button,
input,
optgroup,
select,
textarea {
color: inherit; /* 1 */
font: inherit; /* 2 */
margin: 0; /* 3 */
}
/**
* Address `overflow` set to `hidden` in IE 8/9/10/11.
*/
button {
overflow: visible;
}
/**
* Address inconsistent `text-transform` inheritance for `button` and `select`.
* All other form control elements do not inherit `text-transform` values.
* Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
* Correct `select` style inheritance in Firefox.
*/
button,
select {
text-transform: none;
}
/**
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
* and `video` controls.
* 2. Correct inability to style clickable `input` types in iOS.
* 3. Improve usability and consistency of cursor style between image-type
* `input` and others.
*/
button,
html input[type="button"], /* 1 */
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; /* 2 */
cursor: pointer; /* 3 */
}
/**
* Re-set default cursor for disabled elements.
*/
button[disabled],
html input[disabled] {
cursor: default;
}
/**
* Remove inner padding and border in Firefox 4+.
*/
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
/**
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
* the UA stylesheet.
*/
input {
line-height: normal;
}
/**
* It's recommended that you don't attempt to style these elements.
* Firefox's implementation doesn't respect box-sizing, padding, or width.
*
* 1. Address box sizing set to `content-box` in IE 8/9/10.
* 2. Remove excess padding in IE 8/9/10.
*/
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Fix the cursor style for Chrome's increment/decrement buttons. For certain
* `font-size` values of the `input`, it causes the cursor style of the
* decrement button to change from `default` to `text`.
*/
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Address `appearance` set to `searchfield` in Safari and Chrome.
* 2. Address `box-sizing` set to `border-box` in Safari and Chrome
* (include `-moz` to future-proof).
*/
input[type="search"] {
-webkit-appearance: textfield; /* 1 */
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box; /* 2 */
box-sizing: content-box;
}
/**
* Remove inner padding and search cancel button in Safari and Chrome on OS X.
* Safari (but not Chrome) clips the cancel button when the search input has
* padding (and `textfield` appearance).
*/
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* Define consistent border, margin, and padding.
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/**
* 1. Correct `color` not being inherited in IE 8/9/10/11.
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
*/
legend {
border: 0; /* 1 */
padding: 0; /* 2 */
}
/**
* Remove default vertical scrollbar in IE 8/9/10/11.
*/
textarea {
overflow: auto;
}
/**
* Don't inherit the `font-weight` (applied by a rule above).
* NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
*/
optgroup {
font-weight: bold;
}
/* Tables
========================================================================== */
/**
* Remove most spacing between table cells.
*/
table {
border-collapse: collapse;
border-spacing: 0;
}
td,
th {
padding: 0;
}

283
doc/css/template.css Normal file
View File

@ -0,0 +1,283 @@
.phpdocumentor-content {
position: relative;
display: flex;
gap: var(--spacing-md);
}
.phpdocumentor-content > section:first-of-type {
width: 75%;
flex: 1 1 auto;
}
@media (min-width: 1900px) {
.phpdocumentor-content > section:first-of-type {
width: 100%;
flex: 1 1 auto;
}
}
.phpdocumentor .phpdocumentor-content__title {
margin-top: 0;
}
.phpdocumentor-summary {
font-style: italic;
}
.phpdocumentor-description {
margin-bottom: var(--spacing-md);
}
.phpdocumentor-element {
position: relative;
}
.phpdocumentor-element .phpdocumentor-element {
border: 1px solid var(--primary-color-lighten);
margin-bottom: var(--spacing-md);
padding: var(--spacing-xs);
border-radius: 5px;
}
.phpdocumentor-element.-deprecated .phpdocumentor-element__name {
text-decoration: line-through;
}
@media (min-width: 550px) {
.phpdocumentor-element .phpdocumentor-element {
margin-bottom: var(--spacing-lg);
padding: var(--spacing-md);
}
}
.phpdocumentor-element__modifier {
font-size: var(--text-xxs);
padding: calc(var(--spacing-base-size) / 4) calc(var(--spacing-base-size) / 2);
color: var(--text-color);
background-color: var(--light-gray);
border-radius: 3px;
text-transform: uppercase;
}
.phpdocumentor .phpdocumentor-elements__header {
margin-top: var(--spacing-xxl);
margin-bottom: var(--spacing-lg);
}
.phpdocumentor .phpdocumentor-element__name {
line-height: 1;
margin-top: 0;
font-weight: 300;
font-size: var(--text-lg);
word-break: break-all;
margin-bottom: var(--spacing-sm);
}
@media (min-width: 550px) {
.phpdocumentor .phpdocumentor-element__name {
font-size: var(--text-xl);
margin-bottom: var(--spacing-xs);
}
}
@media (min-width: 1200px) {
.phpdocumentor .phpdocumentor-element__name {
margin-bottom: var(--spacing-md);
}
}
.phpdocumentor-element__package,
.phpdocumentor-element__extends,
.phpdocumentor-element__implements {
display: block;
font-size: var(--text-xxs);
font-weight: normal;
opacity: .7;
}
.phpdocumentor-element__package .phpdocumentor-breadcrumbs {
display: inline;
}
.phpdocumentor .phpdocumentor-signature {
display: block;
font-size: var(--text-sm);
border: 1px solid #f0f0f0;
}
.phpdocumentor .phpdocumentor-signature.-deprecated .phpdocumentor-signature__name {
text-decoration: line-through;
}
@media (min-width: 550px) {
.phpdocumentor .phpdocumentor-signature {
margin-left: calc(var(--spacing-xl) * -1);
width: calc(100% + var(--spacing-xl));
}
}
.phpdocumentor-table-of-contents {
}
.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry {
margin-bottom: var(--spacing-xxs);
margin-left: 2rem;
display: flex;
}
.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry > a {
flex: 0 1 auto;
}
.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry > span {
flex: 1;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry:after {
content: '';
height: 12px;
width: 12px;
left: 16px;
position: absolute;
}
.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-private:after {
background: url('data:image/svg+xml;utf8,<svg width="8" height="10" viewBox="0 0 8 10" fill="none" xmlns="http://www.w3.org/2000/svg"><rect y="4" width="8" height="6" rx="1.4" fill="%23EE6749"/><path d="M2 4C2 3 2.4 1 4 1C5.6 1 6 3 6 4" stroke="%23EE6749" stroke-width="1.4"/></svg>') no-repeat;
}
.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-protected:after {
left: 13px;
background: url('data:image/svg+xml;utf8,<svg width="11" height="9" viewBox="0 0 11 9" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="3" y="3" width="8" height="6" rx="1.4" fill="%23EE9949"/><path d="M5 4C5 3 4.6 1 3 1C1.4 1 1 3 1 4" stroke="%23EE9949" stroke-width="1.4"/></svg>') no-repeat;
}
.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry:before {
width: 1.25rem;
height: 1.25rem;
line-height: 1.25rem;
background: transparent url('data:image/svg+xml;utf8,<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="10" r="10" fill="hsl( 36, 57%, 60%)"/></svg>') no-repeat center center;
content: '';
position: absolute;
left: 0;
border-radius: 50%;
font-weight: 600;
color: white;
text-align: center;
font-size: .75rem;
margin-top: .2rem;
}
.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-method:before {
content: 'M';
color: '';
background-image: url('data:image/svg+xml;utf8,<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="10" r="10" fill="hsl( 36, 57%, 60%)"/></svg>');
}
.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-function:before {
content: 'M';
color: ' 36';
background-image: url('data:image/svg+xml;utf8,<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="10" r="10" fill="hsl( 36, 57%, 60%)"/></svg>');
}
.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-property:before {
content: 'P'
}
.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-constant:before {
content: 'C';
background-color: transparent;
background-image: url('data:image/svg+xml;utf8,<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="-3.05176e-05" y="9.99998" width="14.1422" height="14.1422" transform="rotate(-45 -3.05176e-05 9.99998)" fill="hsl( 36, 57%, 60%)"/></svg>');
}
.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-class:before {
content: 'C'
}
.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-interface:before {
content: 'I'
}
.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-trait:before {
content: 'T'
}
.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-namespace:before {
content: 'N'
}
.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-package:before {
content: 'P'
}
.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-enum:before {
content: 'E'
}
.phpdocumentor-table-of-contents dd {
font-style: italic;
margin-left: 2rem;
}
.phpdocumentor-element-found-in {
display: none;
}
@media (min-width: 550px) {
.phpdocumentor-element-found-in {
display: block;
font-size: var(--text-sm);
color: gray;
margin-bottom: 1rem;
}
}
@media (min-width: 1200px) {
.phpdocumentor-element-found-in {
position: absolute;
top: var(--spacing-sm);
right: var(--spacing-sm);
font-size: var(--text-sm);
margin-bottom: 0;
}
}
.phpdocumentor-element-found-in .phpdocumentor-element-found-in__source {
flex: 0 1 auto;
display: inline-flex;
}
.phpdocumentor-element-found-in .phpdocumentor-element-found-in__source:after {
width: 1.25rem;
height: 1.25rem;
line-height: 1.25rem;
background: transparent url('data:image/svg+xml;utf8,<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="gray"><path d="M5.854 4.854a.5.5 0 1 0-.708-.708l-3.5 3.5a.5.5 0 0 0 0 .708l3.5 3.5a.5.5 0 0 0 .708-.708L2.707 8l3.147-3.146zm4.292 0a.5.5 0 0 1 .708-.708l3.5 3.5a.5.5 0 0 1 0 .708l-3.5 3.5a.5.5 0 0 1-.708-.708L13.293 8l-3.147-3.146z" stroke="gray" stroke-width="1.4"/></svg>') no-repeat center center;
content: '';
left: 0;
border-radius: 50%;
font-weight: 600;
text-align: center;
font-size: .75rem;
margin-top: .2rem;
}
.phpdocumentor-class-graph {
width: 100%; height: 600px; border:1px solid black; overflow: hidden
}
.phpdocumentor-class-graph__graph {
width: 100%;
}
.phpdocumentor-tag-list__definition {
display: flex;
}
.phpdocumentor-tag-link {
margin-right: var(--spacing-sm);
}
.phpdocumentor-table-of-contents .phpdocumentor-table-of-contents__entry.-documentation:before {
content: 'D';
}
code.prettyprint {
background-color: var(--code-background-color);
border: 1px solid #f0f0f0;
border-radius: var(--border-radius-base-size);
box-sizing: border-box;
font-size: var(--text-sm);
padding: var(--spacing-xxxs);
}

View File

@ -0,0 +1,332 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-InterfaceTraits.html" class="">InterfaceTraits</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
</ul>
<article class="phpdocumentor-element -file">
<h2 class="phpdocumentor-content__title">Collection.php</h2>
<p class="phpdocumentor-summary">PHP Basics</p>
<section class="phpdocumentor-description"><p>Copyright (C) 2024 Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
<p>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.</p>
<p>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.</p>
<p>You should have received a copy of the GNU General Public License
along with this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.</p>
</section>
<h3 id="toc">
Table of Contents
<a href="files/src-datastructures-collection.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-classes">
Classes
<a href="files/src-datastructures-collection.html#toc-classes" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -class"><a href="classes/OCC-Basics-DataStructures-Collection.html"><abbr title="\OCC\Basics\DataStructures\Collection">Collection</abbr></a></dt><dd>A generic collection of items.</dd> </dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/DataStructures/Collection.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="files/src-datastructures-collection.html#toc-classes">Classes</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="files/src-datastructures-collection.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,336 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
</ul>
<article class="phpdocumentor-element -file">
<h2 class="phpdocumentor-content__title">StrictCollection.php</h2>
<p class="phpdocumentor-summary">PHP Basics</p>
<section class="phpdocumentor-description"><p>Copyright (C) 2024 Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
<p>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.</p>
<p>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.</p>
<p>You should have received a copy of the GNU General Public License
along with this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.</p>
</section>
<h3 id="toc">
Table of Contents
<a href="files/src-datastructures-strictcollection.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-classes">
Classes
<a href="files/src-datastructures-strictcollection.html#toc-classes" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -class"><a href="classes/OCC-Basics-DataStructures-StrictCollection.html"><abbr title="\OCC\Basics\DataStructures\StrictCollection">StrictCollection</abbr></a></dt><dd>A type-sensitive, unsorted collection.</dd> </dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/DataStructures/StrictCollection.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="files/src-datastructures-strictcollection.html#toc-classes">Classes</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="files/src-datastructures-strictcollection.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,336 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
</ul>
<article class="phpdocumentor-element -file">
<h2 class="phpdocumentor-content__title">StrictList.php</h2>
<p class="phpdocumentor-summary">PHP Basics</p>
<section class="phpdocumentor-description"><p>Copyright (C) 2024 Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
<p>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.</p>
<p>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.</p>
<p>You should have received a copy of the GNU General Public License
along with this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.</p>
</section>
<h3 id="toc">
Table of Contents
<a href="files/src-datastructures-strictlist.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-classes">
Classes
<a href="files/src-datastructures-strictlist.html#toc-classes" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -class"><a href="classes/OCC-Basics-DataStructures-StrictList.html"><abbr title="\OCC\Basics\DataStructures\StrictList">StrictList</abbr></a></dt><dd>A type-sensitive, taversable list.</dd> </dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/DataStructures/StrictList.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="files/src-datastructures-strictlist.html#toc-classes">Classes</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="files/src-datastructures-strictlist.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,336 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
</ul>
<article class="phpdocumentor-element -file">
<h2 class="phpdocumentor-content__title">StrictQueue.php</h2>
<p class="phpdocumentor-summary">PHP Basics</p>
<section class="phpdocumentor-description"><p>Copyright (C) 2024 Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
<p>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.</p>
<p>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.</p>
<p>You should have received a copy of the GNU General Public License
along with this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.</p>
</section>
<h3 id="toc">
Table of Contents
<a href="files/src-datastructures-strictqueue.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-classes">
Classes
<a href="files/src-datastructures-strictqueue.html#toc-classes" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -class"><a href="classes/OCC-Basics-DataStructures-StrictQueue.html"><abbr title="\OCC\Basics\DataStructures\StrictQueue">StrictQueue</abbr></a></dt><dd>A type-sensitive, taversable queue (FIFO).</dd> </dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/DataStructures/StrictQueue.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="files/src-datastructures-strictqueue.html#toc-classes">Classes</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="files/src-datastructures-strictqueue.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,336 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
</ul>
<article class="phpdocumentor-element -file">
<h2 class="phpdocumentor-content__title">StrictStack.php</h2>
<p class="phpdocumentor-summary">PHP Basics</p>
<section class="phpdocumentor-description"><p>Copyright (C) 2024 Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
<p>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.</p>
<p>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.</p>
<p>You should have received a copy of the GNU General Public License
along with this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.</p>
</section>
<h3 id="toc">
Table of Contents
<a href="files/src-datastructures-strictstack.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-classes">
Classes
<a href="files/src-datastructures-strictstack.html#toc-classes" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -class"><a href="classes/OCC-Basics-DataStructures-StrictStack.html"><abbr title="\OCC\Basics\DataStructures\StrictStack">StrictStack</abbr></a></dt><dd>A type-sensitive, taversable stack (LIFO).</dd> </dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/DataStructures/StrictStack.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="files/src-datastructures-strictstack.html#toc-classes">Classes</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="files/src-datastructures-strictstack.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,336 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
</ul>
<article class="phpdocumentor-element -file">
<h2 class="phpdocumentor-content__title">ThrowErrorException.php</h2>
<p class="phpdocumentor-summary">PHP Basics</p>
<section class="phpdocumentor-description"><p>Copyright (C) 2024 Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
<p>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.</p>
<p>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.</p>
<p>You should have received a copy of the GNU General Public License
along with this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.</p>
</section>
<h3 id="toc">
Table of Contents
<a href="files/src-errorhandlers-throwerrorexception.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-classes">
Classes
<a href="files/src-errorhandlers-throwerrorexception.html#toc-classes" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -class"><a href="classes/OCC-Basics-ErrorHandlers-ThrowErrorException.html"><abbr title="\OCC\Basics\ErrorHandlers\ThrowErrorException">ThrowErrorException</abbr></a></dt><dd>Throws internal errors as exceptions.</dd> </dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/ErrorHandlers/ThrowErrorException.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="files/src-errorhandlers-throwerrorexception.html#toc-classes">Classes</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="files/src-errorhandlers-throwerrorexception.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,336 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
</ul>
<article class="phpdocumentor-element -file">
<h2 class="phpdocumentor-content__title">TriggerExceptionError.php</h2>
<p class="phpdocumentor-summary">PHP Basics</p>
<section class="phpdocumentor-description"><p>Copyright (C) 2024 Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
<p>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.</p>
<p>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.</p>
<p>You should have received a copy of the GNU General Public License
along with this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.</p>
</section>
<h3 id="toc">
Table of Contents
<a href="files/src-errorhandlers-triggerexceptionerror.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-classes">
Classes
<a href="files/src-errorhandlers-triggerexceptionerror.html#toc-classes" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -class"><a href="classes/OCC-Basics-ErrorHandlers-TriggerExceptionError.html"><abbr title="\OCC\Basics\ErrorHandlers\TriggerExceptionError">TriggerExceptionError</abbr></a></dt><dd>Triggers errors for uncaught exceptions.</dd> </dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/ErrorHandlers/TriggerExceptionError.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="files/src-errorhandlers-triggerexceptionerror.html#toc-classes">Classes</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="files/src-errorhandlers-triggerexceptionerror.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,336 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
</ul>
<article class="phpdocumentor-element -file">
<h2 class="phpdocumentor-content__title">ArrayAccessTrait.php</h2>
<p class="phpdocumentor-summary">PHP Basics</p>
<section class="phpdocumentor-description"><p>Copyright (C) 2024 Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
<p>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.</p>
<p>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.</p>
<p>You should have received a copy of the GNU General Public License
along with this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.</p>
</section>
<h3 id="toc">
Table of Contents
<a href="files/src-interfaces-arrayaccesstrait.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-traits">
Traits
<a href="files/src-interfaces-arrayaccesstrait.html#toc-traits" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html"><abbr title="\OCC\Basics\Interfaces\ArrayAccessTrait">ArrayAccessTrait</abbr></a></dt><dd>A generic implementation of the ArrayAccess interface.</dd> </dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Interfaces/ArrayAccessTrait.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="files/src-interfaces-arrayaccesstrait.html#toc-traits">Traits</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="files/src-interfaces-arrayaccesstrait.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,336 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
</ul>
<article class="phpdocumentor-element -file">
<h2 class="phpdocumentor-content__title">CountableTrait.php</h2>
<p class="phpdocumentor-summary">PHP Basics</p>
<section class="phpdocumentor-description"><p>Copyright (C) 2024 Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
<p>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.</p>
<p>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.</p>
<p>You should have received a copy of the GNU General Public License
along with this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.</p>
</section>
<h3 id="toc">
Table of Contents
<a href="files/src-interfaces-countabletrait.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-traits">
Traits
<a href="files/src-interfaces-countabletrait.html#toc-traits" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-Interfaces-CountableTrait.html"><abbr title="\OCC\Basics\Interfaces\CountableTrait">CountableTrait</abbr></a></dt><dd>A generic implementation of the Countable interface.</dd> </dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Interfaces/CountableTrait.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="files/src-interfaces-countabletrait.html#toc-traits">Traits</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="files/src-interfaces-countabletrait.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,336 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
</ul>
<article class="phpdocumentor-element -file">
<h2 class="phpdocumentor-content__title">IteratorAggregateTrait.php</h2>
<p class="phpdocumentor-summary">PHP Basics</p>
<section class="phpdocumentor-description"><p>Copyright (C) 2024 Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
<p>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.</p>
<p>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.</p>
<p>You should have received a copy of the GNU General Public License
along with this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.</p>
</section>
<h3 id="toc">
Table of Contents
<a href="files/src-interfaces-iteratoraggregatetrait.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-traits">
Traits
<a href="files/src-interfaces-iteratoraggregatetrait.html#toc-traits" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-Interfaces-IteratorAggregateTrait.html"><abbr title="\OCC\Basics\Interfaces\IteratorAggregateTrait">IteratorAggregateTrait</abbr></a></dt><dd>A generic implementation of the IteratorAggregate interface.</dd> </dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Interfaces/IteratorAggregateTrait.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="files/src-interfaces-iteratoraggregatetrait.html#toc-traits">Traits</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="files/src-interfaces-iteratoraggregatetrait.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,336 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
</ul>
<article class="phpdocumentor-element -file">
<h2 class="phpdocumentor-content__title">IteratorTrait.php</h2>
<p class="phpdocumentor-summary">PHP Basics</p>
<section class="phpdocumentor-description"><p>Copyright (C) 2024 Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
<p>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.</p>
<p>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.</p>
<p>You should have received a copy of the GNU General Public License
along with this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.</p>
</section>
<h3 id="toc">
Table of Contents
<a href="files/src-interfaces-iteratortrait.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-traits">
Traits
<a href="files/src-interfaces-iteratortrait.html#toc-traits" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-Interfaces-IteratorTrait.html"><abbr title="\OCC\Basics\Interfaces\IteratorTrait">IteratorTrait</abbr></a></dt><dd>A generic implementation of the Iterator interface.</dd> </dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Interfaces/IteratorTrait.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="files/src-interfaces-iteratortrait.html#toc-traits">Traits</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="files/src-interfaces-iteratortrait.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,336 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-InterfaceTraits.html" class="">InterfaceTraits</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
</ul>
<article class="phpdocumentor-element -file">
<h2 class="phpdocumentor-content__title">ArrayAccessTrait.php</h2>
<p class="phpdocumentor-summary">PHP Basics</p>
<section class="phpdocumentor-description"><p>Copyright (C) 2024 Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
<p>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.</p>
<p>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.</p>
<p>You should have received a copy of the GNU General Public License
along with this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.</p>
</section>
<h3 id="toc">
Table of Contents
<a href="files/src-interfacetraits-arrayaccesstrait.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-traits">
Traits
<a href="files/src-interfacetraits-arrayaccesstrait.html#toc-traits" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-InterfaceTraits-ArrayAccessTrait.html"><abbr title="\OCC\Basics\InterfaceTraits\ArrayAccessTrait">ArrayAccessTrait</abbr></a></dt><dd>A generic implementation of the ArrayAccess interface.</dd> </dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/InterfaceTraits/ArrayAccessTrait.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="files/src-interfacetraits-arrayaccesstrait.html#toc-traits">Traits</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="files/src-interfacetraits-arrayaccesstrait.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,336 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-InterfaceTraits.html" class="">InterfaceTraits</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
</ul>
<article class="phpdocumentor-element -file">
<h2 class="phpdocumentor-content__title">CountableTrait.php</h2>
<p class="phpdocumentor-summary">PHP Basics</p>
<section class="phpdocumentor-description"><p>Copyright (C) 2024 Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
<p>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.</p>
<p>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.</p>
<p>You should have received a copy of the GNU General Public License
along with this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.</p>
</section>
<h3 id="toc">
Table of Contents
<a href="files/src-interfacetraits-countabletrait.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-traits">
Traits
<a href="files/src-interfacetraits-countabletrait.html#toc-traits" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-InterfaceTraits-CountableTrait.html"><abbr title="\OCC\Basics\InterfaceTraits\CountableTrait">CountableTrait</abbr></a></dt><dd>A generic implementation of the Countable interface.</dd> </dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/InterfaceTraits/CountableTrait.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="files/src-interfacetraits-countabletrait.html#toc-traits">Traits</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="files/src-interfacetraits-countabletrait.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,336 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-InterfaceTraits.html" class="">InterfaceTraits</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
</ul>
<article class="phpdocumentor-element -file">
<h2 class="phpdocumentor-content__title">IteratorAggregateTrait.php</h2>
<p class="phpdocumentor-summary">PHP Basics</p>
<section class="phpdocumentor-description"><p>Copyright (C) 2024 Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
<p>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.</p>
<p>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.</p>
<p>You should have received a copy of the GNU General Public License
along with this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.</p>
</section>
<h3 id="toc">
Table of Contents
<a href="files/src-interfacetraits-iteratoraggregatetrait.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-traits">
Traits
<a href="files/src-interfacetraits-iteratoraggregatetrait.html#toc-traits" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-InterfaceTraits-IteratorAggregateTrait.html"><abbr title="\OCC\Basics\InterfaceTraits\IteratorAggregateTrait">IteratorAggregateTrait</abbr></a></dt><dd>A generic implementation of the IteratorAggregate interface.</dd> </dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/InterfaceTraits/IteratorAggregateTrait.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="files/src-interfacetraits-iteratoraggregatetrait.html#toc-traits">Traits</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="files/src-interfacetraits-iteratoraggregatetrait.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,336 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-InterfaceTraits.html" class="">InterfaceTraits</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
</ul>
<article class="phpdocumentor-element -file">
<h2 class="phpdocumentor-content__title">IteratorTrait.php</h2>
<p class="phpdocumentor-summary">PHP Basics</p>
<section class="phpdocumentor-description"><p>Copyright (C) 2024 Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
<p>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.</p>
<p>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.</p>
<p>You should have received a copy of the GNU General Public License
along with this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.</p>
</section>
<h3 id="toc">
Table of Contents
<a href="files/src-interfacetraits-iteratortrait.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-traits">
Traits
<a href="files/src-interfacetraits-iteratortrait.html#toc-traits" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-InterfaceTraits-IteratorTrait.html"><abbr title="\OCC\Basics\InterfaceTraits\IteratorTrait">IteratorTrait</abbr></a></dt><dd>A generic implementation of the Iterator interface.</dd> </dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/InterfaceTraits/IteratorTrait.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="files/src-interfacetraits-iteratortrait.html#toc-traits">Traits</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="files/src-interfacetraits-iteratortrait.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,336 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
</ul>
<article class="phpdocumentor-element -file">
<h2 class="phpdocumentor-content__title">Getter.php</h2>
<p class="phpdocumentor-summary">PHP Basics</p>
<section class="phpdocumentor-description"><p>Copyright (C) 2024 Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
<p>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.</p>
<p>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.</p>
<p>You should have received a copy of the GNU General Public License
along with this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.</p>
</section>
<h3 id="toc">
Table of Contents
<a href="files/src-traits-getter.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-traits">
Traits
<a href="files/src-traits-getter.html#toc-traits" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-Traits-Getter.html"><abbr title="\OCC\Basics\Traits\Getter">Getter</abbr></a></dt><dd>Reads data from inaccessible properties by using magic methods.</dd> </dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Traits/Getter.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="files/src-traits-getter.html#toc-traits">Traits</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="files/src-traits-getter.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,336 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
</ul>
<article class="phpdocumentor-element -file">
<h2 class="phpdocumentor-content__title">OverloadingGetter.php</h2>
<p class="phpdocumentor-summary">PHP Basics</p>
<section class="phpdocumentor-description"><p>Copyright (C) 2024 Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
<p>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.</p>
<p>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.</p>
<p>You should have received a copy of the GNU General Public License
along with this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.</p>
</section>
<h3 id="toc">
Table of Contents
<a href="files/src-traits-overloadinggetter.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-traits">
Traits
<a href="files/src-traits-overloadinggetter.html#toc-traits" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-Traits-OverloadingGetter.html"><abbr title="\OCC\Basics\Traits\OverloadingGetter">OverloadingGetter</abbr></a></dt><dd>Overloads a class with readable magic properties.</dd> </dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Traits/OverloadingGetter.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="files/src-traits-overloadinggetter.html#toc-traits">Traits</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="files/src-traits-overloadinggetter.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,336 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
</ul>
<article class="phpdocumentor-element -file">
<h2 class="phpdocumentor-content__title">OverloadingSetter.php</h2>
<p class="phpdocumentor-summary">PHP Basics</p>
<section class="phpdocumentor-description"><p>Copyright (C) 2024 Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
<p>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.</p>
<p>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.</p>
<p>You should have received a copy of the GNU General Public License
along with this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.</p>
</section>
<h3 id="toc">
Table of Contents
<a href="files/src-traits-overloadingsetter.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-traits">
Traits
<a href="files/src-traits-overloadingsetter.html#toc-traits" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-Traits-OverloadingSetter.html"><abbr title="\OCC\Basics\Traits\OverloadingSetter">OverloadingSetter</abbr></a></dt><dd>Overloads a class with writable magic properties.</dd> </dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Traits/OverloadingSetter.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="files/src-traits-overloadingsetter.html#toc-traits">Traits</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="files/src-traits-overloadingsetter.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,336 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
</ul>
<article class="phpdocumentor-element -file">
<h2 class="phpdocumentor-content__title">Setter.php</h2>
<p class="phpdocumentor-summary">PHP Basics</p>
<section class="phpdocumentor-description"><p>Copyright (C) 2024 Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
<p>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.</p>
<p>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.</p>
<p>You should have received a copy of the GNU General Public License
along with this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.</p>
</section>
<h3 id="toc">
Table of Contents
<a href="files/src-traits-setter.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-traits">
Traits
<a href="files/src-traits-setter.html#toc-traits" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-Traits-Setter.html"><abbr title="\OCC\Basics\Traits\Setter">Setter</abbr></a></dt><dd>Writes data to inaccessible properties by using magic methods.</dd> </dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Traits/Setter.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="files/src-traits-setter.html#toc-traits">Traits</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="files/src-traits-setter.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,336 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
</ul>
<article class="phpdocumentor-element -file">
<h2 class="phpdocumentor-content__title">Singleton.php</h2>
<p class="phpdocumentor-summary">PHP Basics</p>
<section class="phpdocumentor-description"><p>Copyright (C) 2024 Sebastian Meyer <a href="mailto:sebastian.meyer@opencultureconsulting.com">sebastian.meyer@opencultureconsulting.com</a></p>
<p>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.</p>
<p>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.</p>
<p>You should have received a copy of the GNU General Public License
along with this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.</p>
</section>
<h3 id="toc">
Table of Contents
<a href="files/src-traits-singleton.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-traits">
Traits
<a href="files/src-traits-singleton.html#toc-traits" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-Traits-Singleton.html"><abbr title="\OCC\Basics\Traits\Singleton">Singleton</abbr></a></dt><dd>Allows just a single instance of the class using this trait.</dd> </dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Traits/Singleton.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="files/src-traits-singleton.html#toc-traits">Traits</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="files/src-traits-singleton.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,195 @@
<?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/>.
*/
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 <sebastian.meyer@opencultureconsulting.com>
* @package Basics\DataStructures
*
* @api
*
* @template Item of mixed
* @implements ArrayAccess<array-key, Item>
* @implements IteratorAggregate<Item>
*/
class Collection implements ArrayAccess, Countable, IteratorAggregate
{
/** @use ArrayAccessTrait<Item> */
use ArrayAccessTrait;
/** @use CountableTrait<Item> */
use CountableTrait;
/** @use IteratorAggregateTrait<Item> */
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<Item> 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<Item> Array of collection items
*
* @api
*/
public function toArray(): array
{
return $this->data;
}
/**
* Create a collection of items.
*
* @param array<Item> $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);
}
}

View File

@ -0,0 +1,427 @@
<?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/>.
*/
declare(strict_types=1);
namespace OCC\Basics\DataStructures;
use ArrayAccess;
use Countable;
use DomainException;
use InvalidArgumentException;
use OCC\Basics\Interfaces\ArrayAccessTrait;
use OCC\Basics\Interfaces\CountableTrait;
use OCC\Basics\Traits\Getter;
use Serializable;
/**
* A type-sensitive, unsorted collection.
*
* 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
* names.
*
* Internally it holds the items in the protected `$_data` array.
*
* @author Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
* @package Basics\DataStructures
*
* @property-read string[] $allowedTypes The allowed data types for items.
*
* @api
*
* @template AllowedType of mixed
* @implements ArrayAccess<array-key, AllowedType>
*/
class StrictCollection implements ArrayAccess, Countable, Serializable
{
/** @use ArrayAccessTrait<AllowedType> */
use ArrayAccessTrait;
/** @use CountableTrait<AllowedType> */
use CountableTrait;
use Getter;
/**
* The allowed data types for collection items.
*
* @var string[]
*
* @internal
*/
protected array $allowedTypes = [];
/**
* Holds the collection's items.
*
* @var AllowedType[]
*
* @internal
*/
protected array $_data = [];
/**
* Add/insert a new item at the specified index.
*
* @param array-key $offset The new item's index
* @param AllowedType $value The new item
*
* @return void
*
* @throws InvalidArgumentException if `$offset` is not of allowed type
*
* @api
*/
public function add(int|string $offset, mixed $value): void
{
$this->offsetSet($offset, $value);
}
/**
* Clear the collection of any items.
*
* @return void
*
* @api
*/
public function clear(): void
{
$this->_data = [];
}
/**
* Get the item at the specified index.
*
* @param array-key $offset The item's index
*
* @return ?AllowedType The item or NULL if key is invalid
*
* @api
*/
public function get(int|string $offset): mixed
{
return $this->offsetGet($offset);
}
/**
* Get allowed data types for collection items.
*
* @return string[] The list of allowed data types
*
* @api
*/
public function getAllowedTypes(): array
{
return $this->allowedTypes;
}
/**
* Check if the item's data type is allowed in the collection.
*
* @param AllowedType $value The item to check
*
* @return bool Whether the item's data type is allowed
*
* @api
*/
public function isAllowedType(mixed $value): bool
{
if (count($this->allowedTypes) === 0) {
return true;
}
foreach ($this->allowedTypes as $type) {
$function = 'is_' . $type;
if (function_exists($function) && $function($value)) {
return true;
}
/** @var class-string $fqcn */
$fqcn = ltrim($type, '\\');
if (is_object($value) && is_a($value, $fqcn)) {
return true;
}
}
return false;
}
/**
* Check if collection is empty.
*
* @return bool Whether the collection contains no items
*
* @api
*/
public function isEmpty(): bool
{
return $this->count() === 0;
}
/**
* Check if this collection can be considered a list.
*
* It is considered a list if all keys are consecutive integers starting
* from `0`.
*
* @return bool Whether the collection is a list
*
* @api
*
* @see StrictCollection::toStrictList()
*/
public function isList(): bool
{
return array_is_list($this->_data);
}
/**
* Set the item at the specified offset.
*
* @param ?array-key $offset The offset being set
* @param AllowedType $value The new item for the offset
*
* @return void
*
* @throws InvalidArgumentException if `$offset` or `$value` is not of allowed type
*
* @api
*/
public function offsetSet(mixed $offset, mixed $value): void
{
if (!is_integer($offset) && !is_string($offset)) {
throw new InvalidArgumentException(
sprintf(
'Parameter 1 must be an integer or string, %s given.',
get_debug_type($offset)
)
);
}
if (!$this->isAllowedType($value)) {
throw new InvalidArgumentException(
sprintf(
'Parameter 2 must be an allowed type, %s given.',
get_debug_type($value)
)
);
}
$this->_data[$offset] = $value;
}
/**
* Remove an item from the collection.
*
* @param array-key $offset The item's key
*
* @return void
*
* @api
*/
public function remove(int|string $offset): void
{
$this->offsetUnset($offset);
}
/**
* Get string representation of $this.
*
* @return string The string representation
*/
public function serialize(): string
{
return serialize($this->__serialize());
}
/**
* Set an item at the specified index.
*
* @param array-key $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|string $offset, mixed $value): void
{
$this->offsetSet($offset, $value);
}
/**
* Set allowed data types of collection items.
*
* @param string[] $allowedTypes Allowed data types of items
*
* @return void
*
* @throws InvalidArgumentException if any value of `$allowedTypes` is not a string
*/
protected function setAllowedTypes(array $allowedTypes = []): void
{
if (array_sum(array_map('is_string', $allowedTypes)) !== count($allowedTypes)) {
throw new InvalidArgumentException(
'Allowed types must be array of strings or empty array.'
);
}
$this->allowedTypes = $allowedTypes;
}
/**
* Return array representation of collection.
*
* @return AllowedType[] Array of collection items
*
* @api
*/
public function toArray(): array
{
return $this->_data;
}
/**
* Turn collection into a type-sensitive list.
*
* @return StrictList<AllowedType> A type-sensitive list of the collection's items
*
* @throws DomainException if the collection is not a list
*
* @api
*
* @see StrictCollection::isList()
*/
public function toStrictList(): StrictList
{
if (!$this->isList()) {
throw new DomainException(
'Cannot convert into list: collection contains non-integer and/or non-consecutive keys.'
);
}
$strictList = new StrictList($this->allowedTypes);
$items = $this->toArray();
$strictList->append(...$items);
return $strictList;
}
/**
* Restore $this from string representation.
*
* @param string $data The string representation
*
* @return void
*/
public function unserialize($data): void
{
/** @var mixed[] $dataArray */
$dataArray = unserialize($data);
$this->__unserialize($dataArray);
}
/**
* Magic getter method for $this->allowedTypes.
*
* @return string[] The list of allowed data types
*
* @internal
*/
protected function _magicGetAllowedTypes(): array
{
return $this->getAllowedTypes();
}
/**
* Create a type-sensitive collection 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 [
'StrictCollection::allowedTypes' => $this->allowedTypes,
'StrictCollection::items' => $this->_data
];
}
/**
* Restore $this from array representation.
*
* @param mixed[] $data The array representation
*
* @return void
*
* @internal
*
* @hpsalm-suppress MethodSignatureMismatch
*/
public function __unserialize(array $data): void
{
/** @var string[] $allowedTypes */
$allowedTypes = $data['StrictCollection::allowedTypes'];
$this->setAllowedTypes($allowedTypes);
/** @var AllowedType[] $items */
$items = $data['StrictCollection::items'];
foreach ($items as $offset => $value) {
$this->offsetSet($offset, $value);
}
}
}

View File

@ -0,0 +1,752 @@
<?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/>.
*/
declare(strict_types=1);
namespace OCC\Basics\DataStructures;
use ArrayAccess;
use Countable;
use InvalidArgumentException;
use Iterator;
use OutOfRangeException;
use RangeException;
use RuntimeException;
use SplDoublyLinkedList;
use OCC\Basics\Traits\Getter;
use Serializable;
/**
* A type-sensitive, taversable list.
*
* Extends [\SplDoublyLinkedList](https://www.php.net/spldoublylinkedlist) with
* an option to restrict the allowed data types for list items by providing the
* constructor with an array of atomic types or fully qualified class names.
*
* @author Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
* @package Basics\DataStructures
*
* @property-read string[] $allowedTypes The allowed data types for values.
*
* @api
*
* @template AllowedType of mixed
* @extends SplDoublyLinkedList<AllowedType>
* @implements ArrayAccess<int, AllowedType>
* @implements Iterator<AllowedType>
*/
class StrictList extends SplDoublyLinkedList implements ArrayAccess, Countable, Iterator, Serializable
{
use Getter;
/**
* The allowed data types for list items.
*
* @var string[]
*
* @internal
*/
protected array $allowedTypes = [];
/**
* 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<int, AllowedType> $values */
foreach ($values as $count => $value) {
if (!$this->isAllowedType($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);
}
}
/**
* Peek at the item at the beginning of the list.
*
* @return AllowedType The first item of the list
*
* @throws RuntimeException if the list is empty
*
* @api
*/
public function bottom(): mixed
{
return parent::bottom();
}
/**
* Clear the list of any items.
*
* @return void
*
* @api
*/
public function clear(): void
{
while (!$this->isEmpty()) {
$this->pop();
}
$this->rewind();
}
/**
* Get the number of items on the list.
*
* @return int The number of items on the list
*
* @api
*/
public function count(): int
{
return parent::count();
}
/**
* Get the current list item.
*
* @return AllowedType The current item
*
* @api
*/
public function current(): mixed
{
return parent::current();
}
/**
* 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);
}
/**
* Get allowed data types for list items.
*
* @return string[] The list of allowed data types
*
* @api
*/
public function getAllowedTypes(): array
{
return $this->allowedTypes;
}
/**
* Get the mode of iteration.
*
* @return int The set of flags and modes of iteration
*
* @api
*/
public function getIteratorMode(): int
{
return parent::getIteratorMode();
}
/**
* Check if the item's data type is allowed on the list.
*
* @param AllowedType $value The item to check
*
* @return bool Whether the item's data type is allowed
*
* @api
*/
public function isAllowedType(mixed $value): bool
{
if (count($this->allowedTypes) === 0) {
return true;
}
foreach ($this->allowedTypes as $type) {
$function = 'is_' . $type;
if (function_exists($function) && $function($value)) {
return true;
}
/** @var class-string $fqcn */
$fqcn = ltrim($type, '\\');
if (is_object($value) && is_a($value, $fqcn)) {
return true;
}
}
return false;
}
/**
* Check if list is empty.
*
* @return bool Whether the list contains no items
*
* @api
*/
public function isEmpty(): bool
{
return parent::isEmpty();
}
/**
* 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;
}
/**
* Get the current list index.
*
* @return int The current list index
*
* @api
*/
public function key(): int
{
return parent::key();
}
/**
* Move the cursor to the next list index.
*
* @return void
*
* @api
*/
public function next(): void
{
parent::next();
}
/**
* Check if the specified index exists and is not empty.
*
* @param int $offset The index to check
*
* @return bool Whether the index exists and is not empty
*
* @api
*/
public function offsetExists(mixed $offset): bool
{
return parent::offsetExists($offset);
}
/**
* Get the item from 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 offsetGet(mixed $offset): mixed
{
return parent::offsetGet($offset);
}
/**
* 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->isAllowedType($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);
}
/**
* Unset the item at the specified index.
*
* @param int $offset The item's index
*
* @return void
*
* @throws OutOfRangeException when `$offset` is out of bounds
*
* @api
*/
public function offsetUnset(mixed $offset): void
{
parent::offsetUnset($offset);
}
/**
* Pops an item from the end of the list.
*
* @return AllowedType The item from the end of the list
*
* @throws RuntimeException if the list is empty
*
* @api
*/
public function pop(): mixed
{
return parent::pop();
}
/**
* 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<int, AllowedType> $values */
foreach ($values as $count => $value) {
if (!$this->isAllowedType($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);
}
}
/**
* Move the cursor to the previous list index.
*
* @return void
*
* @api
*/
public function prev(): void
{
parent::prev();
}
/**
* 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->isAllowedType($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);
}
/**
* Rewind the iterator's cursor.
*
* @return void
*
* @api
*/
public function rewind(): void
{
parent::rewind();
}
/**
* 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);
}
/**
* Set allowed data types of list items.
*
* @param string[] $allowedTypes Allowed data types of items
*
* @return void
*
* @throws InvalidArgumentException if any value of `$allowedTypes` is not a string
*/
protected function setAllowedTypes(array $allowedTypes = []): void
{
if (array_sum(array_map('is_string', $allowedTypes)) !== count($allowedTypes)) {
throw new InvalidArgumentException(
'Allowed types must be array of strings or empty array.'
);
}
$this->allowedTypes = $allowedTypes;
}
/**
* Set the mode of iteration.
*
* @param int $mode The new iterator mode (0, 1, 2 or 3)
*
* There are two orthogonal sets of modes that can be set.
*
* The direction of iteration (either one or the other):
* - StrictList::IT_MODE_FIFO (queue style)
* - StrictList::IT_MODE_LIFO (stack style)
*
* The behavior of the iterator (either one or the other):
* - StrictList::IT_MODE_DELETE (delete items)
* - StrictList::IT_MODE_KEEP (keep items)
*
* The default mode is: IT_MODE_FIFO | IT_MODE_KEEP
*
* @return int The set of flags and modes of iteration
*
* @throws RangeException if an invalid `$mode` is given
*
* @api
*/
public function setIteratorMode(int $mode): int
{
if (!in_array($mode, range(0, 3), true)) {
throw new RangeException(
sprintf(
'Iterator mode must be an integer in range [0..3], %d given.',
$mode
)
);
}
return parent::setIteratorMode($mode);
}
/**
* Shift an item from the beginning of the list.
*
* @return AllowedType The first item of the list
*
* @throws RuntimeException if the list is empty
*
* @api
*/
public function shift(): mixed
{
return parent::shift();
}
/**
* Return array representation of list.
*
* @return AllowedType[] Array of list items
*
* @api
*/
public function toArray(): array
{
return iterator_to_array($this, true);
}
/**
* Turn list into a type-sensitive collection.
*
* @return StrictCollection<AllowedType> A type-sensitive collection of the list's items
*
* @api
*/
public function toStrictCollection(): StrictCollection
{
$strictCollection = new StrictCollection($this->allowedTypes);
foreach ($this->toArray() as $offset => $value) {
$strictCollection[$offset] = $value;
}
return $strictCollection;
}
/**
* Peek at the item at the end of the list.
*
* @return AllowedType The last item of the list
*
* @throws RuntimeException if the list is empty
*
* @api
*/
public function top(): mixed
{
return parent::top();
}
/**
* 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->isAllowedType($value)) {
throw new InvalidArgumentException(
sprintf(
'Parameter 1 must be an allowed type, %s given.',
get_debug_type($value)
)
);
}
parent::unshift($value);
}
/**
* Check if current cursor position is valid.
*
* @return bool Whether the current cursor position is valid
*
* @api
*/
public function valid(): bool
{
return parent::valid();
}
/**
* Magic getter method for $this->allowedTypes.
*
* @return string[] The list of allowed data types
*
* @internal
*/
protected function _magicGetAllowedTypes(): array
{
return $this->getAllowedTypes();
}
/**
* 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 [
'StrictList::allowedTypes' => $this->allowedTypes,
'SplDoublyLinkedList::dllist' => iterator_to_array($this),
'SplDoublyLinkedList::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['StrictList::allowedTypes'];
$this->setAllowedTypes($allowedTypes);
/** @var array<int, AllowedType> $values */
$values = $data['SplDoublyLinkedList::dllist'];
$this->append(...$values);
/** @var int $flags */
$flags = $data['SplDoublyLinkedList::flags'];
$this->setIteratorMode($flags);
}
}

View File

@ -0,0 +1,149 @@
<?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/>.
*/
declare(strict_types=1);
namespace OCC\Basics\DataStructures;
use ArrayAccess;
use Countable;
use InvalidArgumentException;
use Iterator;
use RangeException;
use RuntimeException;
use Serializable;
/**
* A type-sensitive, taversable queue (FIFO).
*
* Extends [\SplDoublyLinkedList](https://www.php.net/spldoublylinkedlist) with
* an option to restrict the allowed data types for list items by providing the
* constructor with an array of atomic types or fully qualified class names. It
* also restricts the iterator direction to first-in, first-out (FIFO) exactly
* like [\SplQueue](https://www.php.net/splqueue).
*
* @author Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
* @package Basics\DataStructures
*
* @api
*
* @template AllowedType of mixed
* @extends StrictList<AllowedType>
* @implements ArrayAccess<int, AllowedType>
* @implements Iterator<AllowedType>
*/
class StrictQueue extends StrictList implements ArrayAccess, Countable, Iterator, Serializable
{
/**
* Dequeue an item from the queue.
*
* @return AllowedType The dequeued item
*
* @api
*/
public function dequeue(): mixed
{
return parent::shift();
}
/**
* Add an item to the queue.
*
* @param AllowedType $value The item to enqueue
*
* @return void
*
* @throws InvalidArgumentException if `$value` is not of allowed type
*
* @api
*/
public function enqueue(mixed $value): void
{
parent::push($value);
}
/**
* Set the mode of iteration.
*
* @param int $mode The new iterator mode (0 or 1)
*
* There are two orthogonal sets of modes that can be set.
*
* The direction of iteration (fixed for StrictQueue):
* - StrictQueue::IT_MODE_FIFO (queue style)
*
* The behavior of the iterator (either one or the other):
* - StrictQueue::IT_MODE_DELETE (delete items)
* - StrictQueue::IT_MODE_KEEP (keep items)
*
* The default mode is: IT_MODE_FIFO | IT_MODE_KEEP
*
* @return int The set of flags and modes of iteration
*
* @throws RangeException if an invalid `$mode` is given
* @throws RuntimeException if trying to change iterator direction
*
* @api
*/
final public function setIteratorMode(int $mode): int
{
if ($mode > 1) {
throw new RuntimeException(
sprintf(
'Changing the iterator direction of %s is prohibited.',
static::class
)
);
}
return parent::setIteratorMode($mode);
}
/**
* Create a type-sensitive, traversable queue 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 = [])
{
parent::__construct($allowedTypes);
$this->setIteratorMode(0);
}
}

View File

@ -0,0 +1,149 @@
<?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/>.
*/
declare(strict_types=1);
namespace OCC\Basics\DataStructures;
use ArrayAccess;
use Countable;
use InvalidArgumentException;
use Iterator;
use RangeException;
use RuntimeException;
use Serializable;
/**
* A type-sensitive, taversable stack (LIFO).
*
* Extends [\SplDoublyLinkedList](https://www.php.net/spldoublylinkedlist) with
* an option to restrict the allowed data types for list items by providing the
* constructor with an array of atomic types or fully qualified class names. It
* also restricts the iterator direction to last-in, first-out (LIFO) exactly
* like [\SplStack](https://www.php.net/splstack).
*
* @author Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
* @package Basics\DataStructures
*
* @api
*
* @template AllowedType of mixed
* @extends StrictList<AllowedType>
* @implements ArrayAccess<int, AllowedType>
* @implements Iterator<AllowedType>
*/
class StrictStack extends StrictList implements ArrayAccess, Countable, Iterator, Serializable
{
/**
* Add an item to the stack.
*
* @param AllowedType $value The item to stack
*
* @return void
*
* @throws InvalidArgumentException if `$value` is not of allowed type
*
* @api
*/
public function stack(mixed $value): void
{
parent::push($value);
}
/**
* Unstack an item from the stack.
*
* @return AllowedType The unstacked item
*
* @api
*/
public function unstack(): mixed
{
return parent::pop();
}
/**
* Set the mode of iteration.
*
* @param int $mode The new iterator mode (2 or 3)
*
* There are two orthogonal sets of modes that can be set.
*
* The direction of iteration (fixed for StrictStack):
* - StrictStack::IT_MODE_LIFO (stack style)
*
* The behavior of the iterator (either one or the other):
* - StrictStack::IT_MODE_DELETE (delete items)
* - StrictStack::IT_MODE_KEEP (keep items)
*
* The default mode is: IT_MODE_LIFO | IT_MODE_KEEP
*
* @return int The set of flags and modes of iteration
*
* @throws RangeException if an invalid `$mode` is given
* @throws RuntimeException if trying to change iterator direction
*
* @api
*/
final public function setIteratorMode(int $mode): int
{
if ($mode < 2) {
throw new RuntimeException(
sprintf(
'Changing the iterator direction of %s is prohibited.',
static::class
)
);
}
return parent::setIteratorMode($mode);
}
/**
* Create a type-sensitive, traversable stack 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 = [])
{
parent::__construct($allowedTypes);
$this->setIteratorMode(2);
}
}

View File

@ -0,0 +1,64 @@
<?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/>.
*/
declare(strict_types=1);
namespace OCC\Basics\ErrorHandlers;
use ErrorException;
/**
* Throws internal errors as exceptions.
*
* If registered as error handler, this converts an internal PHP error into an
* `ErrorException`. It respects the `error_reporting` directive.
*
* > Usage: `set_error_handler(new ThrowErrorException());`
*
* @author Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
* @package Basics\ErrorHandlers
*/
class ThrowErrorException
{
/**
* Convert an internal PHP error into an ErrorException.
*
* @param int $errno The severity of the error
* @param string $errstr The error message
* @param ?string $errfile The name of the file the error was raised in
* @param ?int $errline The line number the error was raised in
*
* @return bool Always returns FALSE when not throwing an exception
*
* @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 {
if ((error_reporting() & $errno) > 0) {
throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
}
return false;
}
}

View File

@ -0,0 +1,59 @@
<?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/>.
*/
declare(strict_types=1);
namespace OCC\Basics\ErrorHandlers;
use Throwable;
/**
* Triggers errors for uncaught exceptions.
*
* If registered as exception handler, this catches an uncaught exception and
* converts it into an internal PHP error of severity `E_USER_ERROR`.
*
* > Usage: `set_exception_handler(new TriggerExceptionError());`
*
* @author Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
* @package Basics\ErrorHandlers
*/
class TriggerExceptionError
{
/**
* Convert an uncaught exception into an PHP error.
*
* @param Throwable $exception The exception
*
* @return void
*/
public function __invoke(Throwable $exception): void
{
$message = sprintf(
'Uncaught Exception [%d] in file %s on line %d: %s',
$exception->getCode(),
$exception->getFile(),
$exception->getLine(),
$exception->getMessage()
);
trigger_error($message, E_USER_ERROR);
}
}

View File

@ -0,0 +1,113 @@
<?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/>.
*/
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 <sebastian.meyer@opencultureconsulting.com>
* @package Basics\InterfaceTraits
*
* @api
*
* @template TValue of mixed
* @implements ArrayAccess<array-key, TValue>
* @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]);
}
}

View File

@ -0,0 +1,64 @@
<?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/>.
*/
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 <sebastian.meyer@opencultureconsulting.com>
* @package Basics\InterfaceTraits
*
* @api
*
* @template TValue of mixed
* @implements Countable<TValue>
* @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);
}
}

View File

@ -0,0 +1,65 @@
<?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/>.
*/
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 <sebastian.meyer@opencultureconsulting.com>
* @package Basics\InterfaceTraits
*
* @api
*
* @template TValue of mixed
* @implements IteratorAggregate<TValue>
* @phpstan-require-implements IteratorAggregate
*/
trait IteratorAggregateTrait
{
/**
* Holds the iterable data.
*
* @var TValue[]
*
* @internal
*/
protected array $_data = [];
/**
* Retrieve an external iterator.
*
* @return ArrayIterator<array-key, TValue> New iterator for the data array
*
* @api
*/
public function getIterator(): ArrayIterator
{
return new ArrayIterator($this->_data);
}
}

View File

@ -0,0 +1,128 @@
<?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/>.
*/
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 <sebastian.meyer@opencultureconsulting.com>
* @package Basics\InterfaceTraits
*
* @api
*
* @template TValue of mixed
* @implements Iterator<TValue>
* @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());
}
}

View File

@ -0,0 +1,113 @@
<?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/>.
*/
declare(strict_types=1);
namespace OCC\Basics\Interfaces;
use ArrayAccess;
/**
* A generic implementation of the ArrayAccess interface.
*
* Internally it accesses the protected `$_data` array.
*
* @author Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
* @package Basics\Interfaces
*
* @api
*
* @template TValue of mixed
* @implements ArrayAccess<array-key, TValue>
* @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]);
}
}

View File

@ -0,0 +1,64 @@
<?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/>.
*/
declare(strict_types=1);
namespace OCC\Basics\Interfaces;
use Countable;
/**
* A generic implementation of the Countable interface.
*
* Internally it counts the values of the protected `$_data` array.
*
* @author Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
* @package Basics\Interfaces
*
* @api
*
* @template TValue of mixed
* @implements Countable<TValue>
* @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);
}
}

View File

@ -0,0 +1,65 @@
<?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/>.
*/
declare(strict_types=1);
namespace OCC\Basics\Interfaces;
use ArrayIterator;
use IteratorAggregate;
/**
* A generic implementation of the IteratorAggregate interface.
*
* Internally it iterates over the protected `$_data` array.
*
* @author Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
* @package Basics\Interfaces
*
* @api
*
* @template TValue of mixed
* @implements IteratorAggregate<TValue>
* @phpstan-require-implements IteratorAggregate
*/
trait IteratorAggregateTrait
{
/**
* Holds the iterable data.
*
* @var TValue[]
*
* @internal
*/
protected array $_data = [];
/**
* Retrieve an external iterator.
*
* @return ArrayIterator<array-key, TValue> New iterator for the data array
*
* @api
*/
public function getIterator(): ArrayIterator
{
return new ArrayIterator($this->_data);
}
}

View File

@ -0,0 +1,128 @@
<?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/>.
*/
declare(strict_types=1);
namespace OCC\Basics\Interfaces;
use Iterator;
/**
* A generic implementation of the Iterator interface.
*
* Internally it iterates over the protected `$_data` array.
*
* @author Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
* @package Basics\Interfaces
*
* @api
*
* @template TValue of mixed
* @implements Iterator<TValue>
* @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());
}
}

View File

@ -0,0 +1,88 @@
<?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/>.
*/
declare(strict_types=1);
namespace OCC\Basics\Traits;
use InvalidArgumentException;
/**
* Reads data from inaccessible properties by using magic methods.
*
* To make a `protected` or `private` property readable, provide a method named
* `_magicGet{Property}()` which handles the reading. Replace `{Property}` in
* the method's name with the name of the actual property (with an uppercase
* first letter).
*
* > 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.
*
* @author Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
* @package Basics\Traits
*/
trait Getter
{
/**
* Read data from an inaccessible property.
*
* @param string $property The class property to get
*
* @return mixed The class property's current value
*
* @throws InvalidArgumentException if the property or getter method do not exist
*/
public function __get(string $property): mixed
{
$method = '_magicGet' . ucfirst($property);
if (property_exists(static::class, $property) && method_exists(static::class, $method)) {
return $this->$method();
} else {
throw new InvalidArgumentException(
sprintf(
'Invalid property or missing getter method for property: %s->%s.',
static::class,
$property
)
);
}
}
/**
* Check if an inaccessible property is set and not empty.
*
* @param string $property The class property to check
*
* @return bool Whether the class property is set and not empty
*/
public function __isset(string $property): bool
{
try {
/** @var mixed $value */
$value = $this->__get($property);
} catch (InvalidArgumentException) {
$value = null;
} finally {
return boolval($value ?? null) !== false;
}
}
}

View File

@ -0,0 +1,72 @@
<?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/>.
*/
declare(strict_types=1);
namespace OCC\Basics\Traits;
/**
* Overloads a class with readable magic properties.
*
* Internally it reads the protected `$_data` array whose keys are interpreted
* as property names.
*
* > Example: Reading `Foo->bar` will return the value of `$_data['bar']`.
*
* @author Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
* @package Basics\Traits
*/
trait OverloadingGetter
{
/**
* Holds the magically readable data.
*
* @var mixed[]
*
* @internal
*/
protected array $_data = [];
/**
* Read data from an overloaded property.
*
* @param string $property The class property to get
*
* @return mixed The property's current value or NULL if not set
*/
public function __get(string $property): mixed
{
return $this->_data[$property] ?? null;
}
/**
* Check if an overloaded property is set and not empty.
*
* @param string $property The class property to check
*
* @return bool Whether the class property is set and not empty
*/
public function __isset(string $property): bool
{
$value = $this->__get($property);
return boolval($value) !== false;
}
}

View File

@ -0,0 +1,72 @@
<?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/>.
*/
declare(strict_types=1);
namespace OCC\Basics\Traits;
/**
* Overloads a class with writable magic properties.
*
* Internally it writes the protected `$_data` array whose keys are interpreted
* as property names.
*
* > Example: `Foo->bar = 42;` will set `$_data['bar']` to `42`.
*
* @author Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
* @package Basics\Traits
*/
trait OverloadingSetter
{
/**
* Holds the magically writable data.
*
* @var mixed[]
*
* @internal
*/
protected array $_data = [];
/**
* Write data to an overloaded property.
*
* @param string $property The class property to set
* @param mixed $value The new value of the property
*
* @return void
*/
public function __set(string $property, mixed $value): void
{
$this->_data[$property] = $value;
}
/**
* Unset an overloaded property.
*
* @param string $property The class property to unset
*
* @return void
*/
public function __unset(string $property): void
{
unset($this->_data[$property]);
}
}

View File

@ -0,0 +1,85 @@
<?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/>.
*/
declare(strict_types=1);
namespace OCC\Basics\Traits;
use InvalidArgumentException;
/**
* Writes data to inaccessible properties by using magic methods.
*
* To make a `protected` or `private` property writable, provide a method named
* `_magicSet{Property}()` which handles the writing. Replace `{Property}` in
* the method's name with the name of the actual property (with an uppercase
* first letter).
*
* > 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.
*
* @author Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
* @package Basics\Traits
*/
trait Setter
{
/**
* Write data to an inaccessible property.
*
* @param string $property The class property to set
* @param mixed $value The new value of the property
*
* @return void
*
* @throws InvalidArgumentException if the property or setter method do not exist
*/
public function __set(string $property, mixed $value): void
{
$method = '_magicSet' . ucfirst($property);
if (property_exists(static::class, $property) && method_exists(static::class, $method)) {
$this->$method($value);
} else {
throw new InvalidArgumentException(
sprintf(
'Invalid property or missing setter method for property: %s->%s.',
static::class,
$property
)
);
}
}
/**
* Unset an inaccessible property.
*
* @param string $property The class property to unset
*
* @return void
*/
public function __unset(string $property): void
{
try {
$this->__set($property, null);
} catch (InvalidArgumentException) {
}
}
}

View File

@ -0,0 +1,91 @@
<?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/>.
*/
declare(strict_types=1);
namespace OCC\Basics\Traits;
use LogicException;
/**
* Allows just a single instance of the class using this trait.
*
* Get the singleton by calling the static method `getInstance()`.
*
* If there is no object yet, the constructor is called with the same arguments
* as `getInstance()`. Any later call will just return the already instantiated
* object (irrespective of the given arguments).
*
* In order for this to work as expected, the constructor has to be implemented
* as `private` to prevent direct instantiation of the class.
*
* @author Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
* @package Basics\Traits
*/
trait Singleton
{
/**
* Holds the singleton instance.
*
* @var array<class-string, static>
*
* @internal
*/
private static array $_singleton = [];
/**
* Get a singleton instance of this class.
*
* @param mixed ...$args Constructor arguments
*
* @return static The singleton instance
*
* @api
*/
final public static function getInstance(mixed ...$args): static
{
if (!isset(static::$_singleton[static::class])) {
static::$_singleton[static::class] = new static(...$args);
}
return static::$_singleton[static::class];
}
/**
* This is a singleton class, thus the constructor is private.
*
* @return void
*
* @see Singleton::getInstance() to get an singleton object of the class
*/
abstract private function __construct();
/**
* This is a singleton class, thus cloning is prohibited.
*
* @return void
*
* @throws LogicException when trying to clone the singleton object
*/
final public function __clone()
{
throw new LogicException('Cloning a singleton is prohibited.');
}
}

168
doc/graphs/classes.html Normal file
View File

@ -0,0 +1,168 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<script src='https://unpkg.com/panzoom@8.7.3/dist/panzoom.min.js'></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<div class="phpdocumentor-class-graph">
<img class="phpdocumentor-class-graph__graph" src="graphs/classes.svg" id="scene" />
</div>
<script type="text/javascript">
var element = document.querySelector('#scene');
// And pass it to panzoom
panzoom(element, {
smoothScroll: false
})
</script>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="graphs/classes.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,180 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<div class="section" id="changelog">
<h1>Changelog</h1>
<div class="toc">
<ul class="phpdocumentor-list">
</ul>
</div>
</div>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="guides/changelog/index.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

177
doc/guides/index.html Normal file
View File

@ -0,0 +1,177 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="layout" content="landingpage" />
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<div class="section" id="documentation">
<h1>Documentation</h1>
</div>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="guides/index.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,188 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<div class="section" id="installation">
<h1>Installation</h1>
<div class="toc">
<ul class="phpdocumentor-list">
<li class="toc-item"><a href="guides/installation/test.html#test">Test</a> <ul class="section-level-1">
<li class="toc-item"><a href="guides/installation/test.html#heading-1">Heading 1</a> <ul class="section-level-2">
<li class="toc-item"><a href="guides/installation/test.html#heading-2">Heading 2</a></li>
</ul></li>
</ul></li>
</ul>
</div>
</div>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="guides/installation/index.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,195 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<div class="section" id="test">
<h1>Test</h1>
<div class="section" id="heading-1">
<h2>Heading 1</h2>
<div class="section" id="heading-2">
<h3>Heading 2</h3>
<div class="section" id="heading-3">
<h4>Heading 3</h4>
<div class="section" id="heading-4">
<h5>Heading 4</h5>
</div>
</div>
</div>
</div>
</div>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="guides/installation/test.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

213
doc/index.html Normal file
View File

@ -0,0 +1,213 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
<li><a href>Home</a></li>
</ul>
<h2 class="phpdocumentor-content__title">PHP Basics</h2>
<p class="phpdocumentor-summary">A collection of generic classes and useful traits for PHP projects.</p>
<p>The package currently contains classes for <a href="packages/Basics-DataStructures.html">type-sensitive
data structures</a>, <a href="packages/Basics-ErrorHandlers.html">error and exception handlers</a>, multiple
<a href="packages/Basics-Interfaces.html">traits implementing standard interfaces</a>, and more generic
<a href="packages/Basics-Traits.html">traits for common use cases</a>. They share the same design principles
like property and method naming schema, highest coding standards of <a href="https://phpstan.org/">PHPStan</a>
and <a href="https://psalm.dev/">Psalm</a>, and full <a href="https://www.php-fig.org/psr/psr-12/">PSR-12</a>
compliance to make sure they can be combined and easily re-used in other projects.</p>
<h3 id="toc">Table of Contents</h3>
<h4 id="toc-documentation">Documentation</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -documentation">
<a href="guides/installation/index.html#installation">Installation</a>
</dt>
<dd>
<a href="guides/installation/test.html#test">Test</a><br/>
</dd>
<dt class="phpdocumentor-table-of-contents__entry -documentation">
<a href="guides/changelog/index.html#changelog">Changelog</a>
</dt>
</dl>
<h4 id="toc-packages">Packages</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -package">
<a href="packages/Basics.html">Basics</a>
</dt>
<dd>
<a href="packages/Basics-DataStructures.html">DataStructures</a><br/>
<a href="packages/Basics-ErrorHandlers.html">ErrorHandlers</a><br/>
<a href="packages/Basics-Interfaces.html">Interfaces</a><br/>
<a href="packages/Basics-Traits.html">Traits</a><br/>
</dd>
</dl>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="index.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

209
doc/indices/files.html Normal file
View File

@ -0,0 +1,209 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<h2 class="phpdocumentor-content__title">Files</h2>
<h3>A</h3>
<ul class="phpdocumentor-list">
<li><a href="files/src-interfaces-arrayaccesstrait.html"><abbr title="src/Interfaces/ArrayAccessTrait.php">ArrayAccessTrait.php</abbr></a></li>
</ul>
<h3>C</h3>
<ul class="phpdocumentor-list">
<li><a href="files/src-interfaces-countabletrait.html"><abbr title="src/Interfaces/CountableTrait.php">CountableTrait.php</abbr></a></li>
</ul>
<h3>G</h3>
<ul class="phpdocumentor-list">
<li><a href="files/src-traits-getter.html"><abbr title="src/Traits/Getter.php">Getter.php</abbr></a></li>
</ul>
<h3>I</h3>
<ul class="phpdocumentor-list">
<li><a href="files/src-interfaces-iteratoraggregatetrait.html"><abbr title="src/Interfaces/IteratorAggregateTrait.php">IteratorAggregateTrait.php</abbr></a></li>
<li><a href="files/src-interfaces-iteratortrait.html"><abbr title="src/Interfaces/IteratorTrait.php">IteratorTrait.php</abbr></a></li>
</ul>
<h3>O</h3>
<ul class="phpdocumentor-list">
<li><a href="files/src-traits-overloadinggetter.html"><abbr title="src/Traits/OverloadingGetter.php">OverloadingGetter.php</abbr></a></li>
<li><a href="files/src-traits-overloadingsetter.html"><abbr title="src/Traits/OverloadingSetter.php">OverloadingSetter.php</abbr></a></li>
</ul>
<h3>S</h3>
<ul class="phpdocumentor-list">
<li><a href="files/src-traits-setter.html"><abbr title="src/Traits/Setter.php">Setter.php</abbr></a></li>
<li><a href="files/src-traits-singleton.html"><abbr title="src/Traits/Singleton.php">Singleton.php</abbr></a></li>
<li><a href="files/src-datastructures-strictcollection.html"><abbr title="src/DataStructures/StrictCollection.php">StrictCollection.php</abbr></a></li>
<li><a href="files/src-datastructures-strictlist.html"><abbr title="src/DataStructures/StrictList.php">StrictList.php</abbr></a></li>
<li><a href="files/src-datastructures-strictqueue.html"><abbr title="src/DataStructures/StrictQueue.php">StrictQueue.php</abbr></a></li>
<li><a href="files/src-datastructures-strictstack.html"><abbr title="src/DataStructures/StrictStack.php">StrictStack.php</abbr></a></li>
</ul>
<h3>T</h3>
<ul class="phpdocumentor-list">
<li><a href="files/src-errorhandlers-throwerrorexception.html"><abbr title="src/ErrorHandlers/ThrowErrorException.php">ThrowErrorException.php</abbr></a></li>
<li><a href="files/src-errorhandlers-triggerexceptionerror.html"><abbr title="src/ErrorHandlers/TriggerExceptionError.php">TriggerExceptionError.php</abbr></a></li>
</ul>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="indices/files.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

173
doc/js/search.js Normal file
View File

@ -0,0 +1,173 @@
// Search module for phpDocumentor
//
// This module is a wrapper around fuse.js that will use a given index and attach itself to a
// search form and to a search results pane identified by the following data attributes:
//
// 1. data-search-form
// 2. data-search-results
//
// The data-search-form is expected to have a single input element of type 'search' that will trigger searching for
// a series of results, were the data-search-results pane is expected to have a direct UL child that will be populated
// with rendered results.
//
// The search has various stages, upon loading this stage the data-search-form receives the CSS class
// 'phpdocumentor-search--enabled'; this indicates that JS is allowed and indices are being loaded. It is recommended
// to hide the form by default and show it when it receives this class to achieve progressive enhancement for this
// feature.
//
// After loading this module, it is expected to load a search index asynchronously, for example:
//
// <script defer src="js/searchIndex.js"></script>
//
// In this script the generated index should attach itself to the search module using the `appendIndex` function. By
// doing it like this the page will continue loading, unhindered by the loading of the search.
//
// After the page has fully loaded, and all these deferred indexes loaded, the initialization of the search module will
// be called and the form will receive the class 'phpdocumentor-search--active', indicating search is ready. At this
// point, the input field will also have it's 'disabled' attribute removed.
var Search = (function () {
var fuse;
var index = [];
var options = {
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"fqsen",
"name",
"summary",
"url"
]
};
// Credit David Walsh (https://davidwalsh.name/javascript-debounce-function)
// Returns a function, that, as long as it continues to be invoked, will not
// be triggered. The function will be called after it stops being called for
// N milliseconds. If `immediate` is passed, trigger the function on the
// leading edge, instead of the trailing.
function debounce(func, wait, immediate) {
var timeout;
return function executedFunction() {
var context = this;
var args = arguments;
var later = function () {
timeout = null;
if (!immediate) func.apply(context, args);
};
var callNow = immediate && !timeout;
clearTimeout(timeout);
timeout = setTimeout(later, wait);
if (callNow) func.apply(context, args);
};
}
function close() {
// Start scroll prevention: https://css-tricks.com/prevent-page-scrolling-when-a-modal-is-open/
const scrollY = document.body.style.top;
document.body.style.position = '';
document.body.style.top = '';
window.scrollTo(0, parseInt(scrollY || '0') * -1);
// End scroll prevention
var form = document.querySelector('[data-search-form]');
var searchResults = document.querySelector('[data-search-results]');
form.classList.toggle('phpdocumentor-search--has-results', false);
searchResults.classList.add('phpdocumentor-search-results--hidden');
var searchField = document.querySelector('[data-search-form] input[type="search"]');
searchField.blur();
}
function search(event) {
// Start scroll prevention: https://css-tricks.com/prevent-page-scrolling-when-a-modal-is-open/
document.body.style.position = 'fixed';
document.body.style.top = `-${window.scrollY}px`;
// End scroll prevention
// prevent enter's from autosubmitting
event.stopPropagation();
var form = document.querySelector('[data-search-form]');
var searchResults = document.querySelector('[data-search-results]');
var searchResultEntries = document.querySelector('[data-search-results] .phpdocumentor-search-results__entries');
searchResultEntries.innerHTML = '';
if (!event.target.value) {
close();
return;
}
form.classList.toggle('phpdocumentor-search--has-results', true);
searchResults.classList.remove('phpdocumentor-search-results--hidden');
var results = fuse.search(event.target.value, {limit: 25});
results.forEach(function (result) {
var entry = document.createElement("li");
entry.classList.add("phpdocumentor-search-results__entry");
entry.innerHTML += '<h3><a href="' + document.baseURI + result.url + '">' + result.name + "</a></h3>\n";
entry.innerHTML += '<small>' + result.fqsen + "</small>\n";
entry.innerHTML += '<div class="phpdocumentor-summary">' + result.summary + '</div>';
searchResultEntries.appendChild(entry)
});
}
function appendIndex(added) {
index = index.concat(added);
// re-initialize search engine when appending an index after initialisation
if (typeof fuse !== 'undefined') {
fuse = new Fuse(index, options);
}
}
function init() {
fuse = new Fuse(index, options);
var form = document.querySelector('[data-search-form]');
var searchField = document.querySelector('[data-search-form] input[type="search"]');
var closeButton = document.querySelector('.phpdocumentor-search-results__close');
closeButton.addEventListener('click', function() { close() }.bind(this));
var searchResults = document.querySelector('[data-search-results]');
searchResults.addEventListener('click', function() { close() }.bind(this));
form.classList.add('phpdocumentor-search--active');
searchField.setAttribute('placeholder', 'Search (Press "/" to focus)');
searchField.removeAttribute('disabled');
searchField.addEventListener('keyup', debounce(search, 300));
window.addEventListener('keyup', function (event) {
if (event.key === '/') {
searchField.focus();
}
if (event.code === 'Escape') {
close();
}
}.bind(this));
}
return {
appendIndex,
init
}
})();
window.addEventListener('DOMContentLoaded', function () {
var form = document.querySelector('[data-search-form]');
// When JS is supported; show search box. Must be before including the search for it to take effect immediately
form.classList.add('phpdocumentor-search--enabled');
});
window.addEventListener('load', function () {
Search.init();
});

529
doc/js/searchIndex.js Normal file
View File

@ -0,0 +1,529 @@
Search.appendIndex(
[
{
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictCollection",
"name": "StrictCollection",
"summary": "A\u0020type\u002Dsensitive,\u0020unsorted\u0020collection.",
"url": "classes/OCC-Basics-DataStructures-StrictCollection.html"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictCollection\u003A\u003Aadd\u0028\u0029",
"name": "add",
"summary": "Add\/insert\u0020a\u0020new\u0020item\u0020at\u0020the\u0020specified\u0020index.",
"url": "classes/OCC-Basics-DataStructures-StrictCollection.html#method_add"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictCollection\u003A\u003Aclear\u0028\u0029",
"name": "clear",
"summary": "Clear\u0020the\u0020collection\u0020of\u0020any\u0020items.",
"url": "classes/OCC-Basics-DataStructures-StrictCollection.html#method_clear"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictCollection\u003A\u003Aget\u0028\u0029",
"name": "get",
"summary": "Get\u0020the\u0020item\u0020at\u0020the\u0020specified\u0020index.",
"url": "classes/OCC-Basics-DataStructures-StrictCollection.html#method_get"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictCollection\u003A\u003AgetAllowedTypes\u0028\u0029",
"name": "getAllowedTypes",
"summary": "Get\u0020allowed\u0020data\u0020types\u0020for\u0020collection\u0020items.",
"url": "classes/OCC-Basics-DataStructures-StrictCollection.html#method_getAllowedTypes"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictCollection\u003A\u003AisAllowedType\u0028\u0029",
"name": "isAllowedType",
"summary": "Check\u0020if\u0020the\u0020item\u0027s\u0020data\u0020type\u0020is\u0020allowed\u0020in\u0020the\u0020collection.",
"url": "classes/OCC-Basics-DataStructures-StrictCollection.html#method_isAllowedType"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictCollection\u003A\u003AisEmpty\u0028\u0029",
"name": "isEmpty",
"summary": "Check\u0020if\u0020collection\u0020is\u0020empty.",
"url": "classes/OCC-Basics-DataStructures-StrictCollection.html#method_isEmpty"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictCollection\u003A\u003AisList\u0028\u0029",
"name": "isList",
"summary": "Check\u0020if\u0020this\u0020collection\u0020can\u0020be\u0020considered\u0020a\u0020list.",
"url": "classes/OCC-Basics-DataStructures-StrictCollection.html#method_isList"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictCollection\u003A\u003AoffsetSet\u0028\u0029",
"name": "offsetSet",
"summary": "Set\u0020the\u0020item\u0020at\u0020the\u0020specified\u0020offset.",
"url": "classes/OCC-Basics-DataStructures-StrictCollection.html#method_offsetSet"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictCollection\u003A\u003Aremove\u0028\u0029",
"name": "remove",
"summary": "Remove\u0020an\u0020item\u0020from\u0020the\u0020collection.",
"url": "classes/OCC-Basics-DataStructures-StrictCollection.html#method_remove"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictCollection\u003A\u003Aserialize\u0028\u0029",
"name": "serialize",
"summary": "Get\u0020string\u0020representation\u0020of\u0020\u0024this.",
"url": "classes/OCC-Basics-DataStructures-StrictCollection.html#method_serialize"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictCollection\u003A\u003Aset\u0028\u0029",
"name": "set",
"summary": "Set\u0020an\u0020item\u0020at\u0020the\u0020specified\u0020index.",
"url": "classes/OCC-Basics-DataStructures-StrictCollection.html#method_set"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictCollection\u003A\u003AsetAllowedTypes\u0028\u0029",
"name": "setAllowedTypes",
"summary": "Set\u0020allowed\u0020data\u0020types\u0020of\u0020collection\u0020items.",
"url": "classes/OCC-Basics-DataStructures-StrictCollection.html#method_setAllowedTypes"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictCollection\u003A\u003AtoArray\u0028\u0029",
"name": "toArray",
"summary": "Return\u0020array\u0020representation\u0020of\u0020collection.",
"url": "classes/OCC-Basics-DataStructures-StrictCollection.html#method_toArray"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictCollection\u003A\u003AtoStrictList\u0028\u0029",
"name": "toStrictList",
"summary": "Turn\u0020collection\u0020into\u0020a\u0020type\u002Dsensitive\u0020list.",
"url": "classes/OCC-Basics-DataStructures-StrictCollection.html#method_toStrictList"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictCollection\u003A\u003Aunserialize\u0028\u0029",
"name": "unserialize",
"summary": "Restore\u0020\u0024this\u0020from\u0020string\u0020representation.",
"url": "classes/OCC-Basics-DataStructures-StrictCollection.html#method_unserialize"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictCollection\u003A\u003A__construct\u0028\u0029",
"name": "__construct",
"summary": "Create\u0020a\u0020type\u002Dsensitive\u0020collection\u0020of\u0020items.",
"url": "classes/OCC-Basics-DataStructures-StrictCollection.html#method___construct"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList",
"name": "StrictList",
"summary": "A\u0020type\u002Dsensitive,\u0020taversable\u0020list.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003Aadd\u0028\u0029",
"name": "add",
"summary": "Add\/insert\u0020a\u0020new\u0020item\u0020at\u0020the\u0020specified\u0020offset.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method_add"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003Aappend\u0028\u0029",
"name": "append",
"summary": "Append\u0020items\u0020at\u0020the\u0020end\u0020of\u0020the\u0020list.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method_append"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003Abottom\u0028\u0029",
"name": "bottom",
"summary": "Peek\u0020at\u0020the\u0020item\u0020at\u0020the\u0020beginning\u0020of\u0020the\u0020list.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method_bottom"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003Aclear\u0028\u0029",
"name": "clear",
"summary": "Clear\u0020the\u0020list\u0020of\u0020any\u0020items.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method_clear"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003Acount\u0028\u0029",
"name": "count",
"summary": "Get\u0020the\u0020number\u0020of\u0020items\u0020on\u0020the\u0020list.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method_count"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003Acurrent\u0028\u0029",
"name": "current",
"summary": "Get\u0020the\u0020current\u0020list\u0020item.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method_current"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003Aget\u0028\u0029",
"name": "get",
"summary": "Get\u0020the\u0020item\u0020at\u0020the\u0020specified\u0020index.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method_get"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003AgetAllowedTypes\u0028\u0029",
"name": "getAllowedTypes",
"summary": "Get\u0020allowed\u0020data\u0020types\u0020for\u0020list\u0020items.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method_getAllowedTypes"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003AgetIteratorMode\u0028\u0029",
"name": "getIteratorMode",
"summary": "Get\u0020the\u0020mode\u0020of\u0020iteration.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method_getIteratorMode"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003AisAllowedType\u0028\u0029",
"name": "isAllowedType",
"summary": "Check\u0020if\u0020the\u0020item\u0027s\u0020data\u0020type\u0020is\u0020allowed\u0020on\u0020the\u0020list.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method_isAllowedType"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003AisEmpty\u0028\u0029",
"name": "isEmpty",
"summary": "Check\u0020if\u0020list\u0020is\u0020empty.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method_isEmpty"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003AisList\u0028\u0029",
"name": "isList",
"summary": "Check\u0020if\u0020this\u0020can\u0020be\u0020considered\u0020a\u0020list.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method_isList"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003Akey\u0028\u0029",
"name": "key",
"summary": "Get\u0020the\u0020current\u0020list\u0020index.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method_key"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003Anext\u0028\u0029",
"name": "next",
"summary": "Move\u0020the\u0020cursor\u0020to\u0020the\u0020next\u0020list\u0020index.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method_next"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003AoffsetExists\u0028\u0029",
"name": "offsetExists",
"summary": "Check\u0020if\u0020the\u0020specified\u0020index\u0020exists\u0020and\u0020is\u0020not\u0020empty.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method_offsetExists"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003AoffsetGet\u0028\u0029",
"name": "offsetGet",
"summary": "Get\u0020the\u0020item\u0020from\u0020the\u0020specified\u0020index.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method_offsetGet"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003AoffsetSet\u0028\u0029",
"name": "offsetSet",
"summary": "Set\u0020the\u0020item\u0020at\u0020the\u0020specified\u0020offset.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method_offsetSet"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003AoffsetUnset\u0028\u0029",
"name": "offsetUnset",
"summary": "Unset\u0020the\u0020item\u0020at\u0020the\u0020specified\u0020index.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method_offsetUnset"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003Apop\u0028\u0029",
"name": "pop",
"summary": "Pops\u0020an\u0020item\u0020from\u0020the\u0020end\u0020of\u0020the\u0020list.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method_pop"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003Aprepend\u0028\u0029",
"name": "prepend",
"summary": "Prepend\u0020items\u0020at\u0020the\u0020start\u0020of\u0020the\u0020list.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method_prepend"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003Aprev\u0028\u0029",
"name": "prev",
"summary": "Move\u0020the\u0020cursor\u0020to\u0020the\u0020previous\u0020list\u0020index.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method_prev"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003Apush\u0028\u0029",
"name": "push",
"summary": "Push\u0020an\u0020item\u0020at\u0020the\u0020end\u0020of\u0020the\u0020list.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method_push"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003Aremove\u0028\u0029",
"name": "remove",
"summary": "Remove\u0020an\u0020item\u0020from\u0020the\u0020list.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method_remove"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003Arewind\u0028\u0029",
"name": "rewind",
"summary": "Rewind\u0020the\u0020iterator\u0027s\u0020cursor.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method_rewind"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003Aset\u0028\u0029",
"name": "set",
"summary": "Set\u0020an\u0020item\u0020at\u0020the\u0020specified\u0020index.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method_set"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003AsetAllowedTypes\u0028\u0029",
"name": "setAllowedTypes",
"summary": "Set\u0020allowed\u0020data\u0020types\u0020of\u0020list\u0020items.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method_setAllowedTypes"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003AsetIteratorMode\u0028\u0029",
"name": "setIteratorMode",
"summary": "Set\u0020the\u0020mode\u0020of\u0020iteration.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method_setIteratorMode"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003Ashift\u0028\u0029",
"name": "shift",
"summary": "Shift\u0020an\u0020item\u0020from\u0020the\u0020beginning\u0020of\u0020the\u0020list.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method_shift"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003AtoArray\u0028\u0029",
"name": "toArray",
"summary": "Return\u0020array\u0020representation\u0020of\u0020list.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method_toArray"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003AtoStrictCollection\u0028\u0029",
"name": "toStrictCollection",
"summary": "Turn\u0020list\u0020into\u0020a\u0020type\u002Dsensitive\u0020collection.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method_toStrictCollection"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003Atop\u0028\u0029",
"name": "top",
"summary": "Peek\u0020at\u0020the\u0020item\u0020at\u0020the\u0020end\u0020of\u0020the\u0020list.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method_top"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003Aunshift\u0028\u0029",
"name": "unshift",
"summary": "Prepend\u0020the\u0020list\u0020with\u0020an\u0020item.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method_unshift"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003Avalid\u0028\u0029",
"name": "valid",
"summary": "Check\u0020if\u0020current\u0020cursor\u0020position\u0020is\u0020valid.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method_valid"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictList\u003A\u003A__construct\u0028\u0029",
"name": "__construct",
"summary": "Create\u0020a\u0020type\u002Dsensitive,\u0020traversable\u0020list\u0020of\u0020items.",
"url": "classes/OCC-Basics-DataStructures-StrictList.html#method___construct"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictQueue",
"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",
"summary": "Add\u0020an\u0020item\u0020to\u0020the\u0020queue.",
"url": "classes/OCC-Basics-DataStructures-StrictQueue.html#method_enqueue"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictQueue\u003A\u003AsetIteratorMode\u0028\u0029",
"name": "setIteratorMode",
"summary": "Set\u0020the\u0020mode\u0020of\u0020iteration.",
"url": "classes/OCC-Basics-DataStructures-StrictQueue.html#method_setIteratorMode"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictQueue\u003A\u003A__construct\u0028\u0029",
"name": "__construct",
"summary": "Create\u0020a\u0020type\u002Dsensitive,\u0020traversable\u0020queue\u0020of\u0020items.",
"url": "classes/OCC-Basics-DataStructures-StrictQueue.html#method___construct"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictStack",
"name": "StrictStack",
"summary": "A\u0020type\u002Dsensitive,\u0020taversable\u0020stack\u0020\u0028LIFO\u0029.",
"url": "classes/OCC-Basics-DataStructures-StrictStack.html"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictStack\u003A\u003Astack\u0028\u0029",
"name": "stack",
"summary": "Add\u0020an\u0020item\u0020to\u0020the\u0020stack.",
"url": "classes/OCC-Basics-DataStructures-StrictStack.html#method_stack"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictStack\u003A\u003Aunstack\u0028\u0029",
"name": "unstack",
"summary": "Unstack\u0020an\u0020item\u0020from\u0020the\u0020stack.",
"url": "classes/OCC-Basics-DataStructures-StrictStack.html#method_unstack"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictStack\u003A\u003AsetIteratorMode\u0028\u0029",
"name": "setIteratorMode",
"summary": "Set\u0020the\u0020mode\u0020of\u0020iteration.",
"url": "classes/OCC-Basics-DataStructures-StrictStack.html#method_setIteratorMode"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures\\StrictStack\u003A\u003A__construct\u0028\u0029",
"name": "__construct",
"summary": "Create\u0020a\u0020type\u002Dsensitive,\u0020traversable\u0020stack\u0020of\u0020items.",
"url": "classes/OCC-Basics-DataStructures-StrictStack.html#method___construct"
}, {
"fqsen": "\\OCC\\Basics\\ErrorHandlers\\ThrowErrorException",
"name": "ThrowErrorException",
"summary": "Throws\u0020internal\u0020errors\u0020as\u0020exceptions.",
"url": "classes/OCC-Basics-ErrorHandlers-ThrowErrorException.html"
}, {
"fqsen": "\\OCC\\Basics\\ErrorHandlers\\ThrowErrorException\u003A\u003A__invoke\u0028\u0029",
"name": "__invoke",
"summary": "Convert\u0020an\u0020internal\u0020PHP\u0020error\u0020into\u0020an\u0020ErrorException.",
"url": "classes/OCC-Basics-ErrorHandlers-ThrowErrorException.html#method___invoke"
}, {
"fqsen": "\\OCC\\Basics\\ErrorHandlers\\TriggerExceptionError",
"name": "TriggerExceptionError",
"summary": "Triggers\u0020errors\u0020for\u0020uncaught\u0020exceptions.",
"url": "classes/OCC-Basics-ErrorHandlers-TriggerExceptionError.html"
}, {
"fqsen": "\\OCC\\Basics\\ErrorHandlers\\TriggerExceptionError\u003A\u003A__invoke\u0028\u0029",
"name": "__invoke",
"summary": "Convert\u0020an\u0020uncaught\u0020exception\u0020into\u0020an\u0020PHP\u0020error.",
"url": "classes/OCC-Basics-ErrorHandlers-TriggerExceptionError.html#method___invoke"
}, {
"fqsen": "\\OCC\\Basics\\Interfaces\\ArrayAccessTrait",
"name": "ArrayAccessTrait",
"summary": "A\u0020generic\u0020implementation\u0020of\u0020the\u0020ArrayAccess\u0020interface.",
"url": "classes/OCC-Basics-Interfaces-ArrayAccessTrait.html"
}, {
"fqsen": "\\OCC\\Basics\\Interfaces\\ArrayAccessTrait\u003A\u003AoffsetExists\u0028\u0029",
"name": "offsetExists",
"summary": "Check\u0020if\u0020the\u0020specified\u0020offset\u0020exists.",
"url": "classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#method_offsetExists"
}, {
"fqsen": "\\OCC\\Basics\\Interfaces\\ArrayAccessTrait\u003A\u003AoffsetGet\u0028\u0029",
"name": "offsetGet",
"summary": "Retrieve\u0020data\u0020at\u0020the\u0020specified\u0020offset.",
"url": "classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#method_offsetGet"
}, {
"fqsen": "\\OCC\\Basics\\Interfaces\\ArrayAccessTrait\u003A\u003AoffsetSet\u0028\u0029",
"name": "offsetSet",
"summary": "Assign\u0020a\u0020value\u0020to\u0020the\u0020specified\u0020offset.",
"url": "classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#method_offsetSet"
}, {
"fqsen": "\\OCC\\Basics\\Interfaces\\ArrayAccessTrait\u003A\u003AoffsetUnset\u0028\u0029",
"name": "offsetUnset",
"summary": "Unset\u0020the\u0020specified\u0020offset.",
"url": "classes/OCC-Basics-Interfaces-ArrayAccessTrait.html#method_offsetUnset"
}, {
"fqsen": "\\OCC\\Basics\\Interfaces\\CountableTrait",
"name": "CountableTrait",
"summary": "A\u0020generic\u0020implementation\u0020of\u0020the\u0020Countable\u0020interface.",
"url": "classes/OCC-Basics-Interfaces-CountableTrait.html"
}, {
"fqsen": "\\OCC\\Basics\\Interfaces\\CountableTrait\u003A\u003Acount\u0028\u0029",
"name": "count",
"summary": "Count\u0020the\u0020data\u0020items.",
"url": "classes/OCC-Basics-Interfaces-CountableTrait.html#method_count"
}, {
"fqsen": "\\OCC\\Basics\\Interfaces\\IteratorAggregateTrait",
"name": "IteratorAggregateTrait",
"summary": "A\u0020generic\u0020implementation\u0020of\u0020the\u0020IteratorAggregate\u0020interface.",
"url": "classes/OCC-Basics-Interfaces-IteratorAggregateTrait.html"
}, {
"fqsen": "\\OCC\\Basics\\Interfaces\\IteratorAggregateTrait\u003A\u003AgetIterator\u0028\u0029",
"name": "getIterator",
"summary": "Retrieve\u0020an\u0020external\u0020iterator.",
"url": "classes/OCC-Basics-Interfaces-IteratorAggregateTrait.html#method_getIterator"
}, {
"fqsen": "\\OCC\\Basics\\Interfaces\\IteratorTrait",
"name": "IteratorTrait",
"summary": "A\u0020generic\u0020implementation\u0020of\u0020the\u0020Iterator\u0020interface.",
"url": "classes/OCC-Basics-Interfaces-IteratorTrait.html"
}, {
"fqsen": "\\OCC\\Basics\\Interfaces\\IteratorTrait\u003A\u003Acurrent\u0028\u0029",
"name": "current",
"summary": "Return\u0020the\u0020current\u0020item.",
"url": "classes/OCC-Basics-Interfaces-IteratorTrait.html#method_current"
}, {
"fqsen": "\\OCC\\Basics\\Interfaces\\IteratorTrait\u003A\u003Akey\u0028\u0029",
"name": "key",
"summary": "Return\u0020the\u0020current\u0020key.",
"url": "classes/OCC-Basics-Interfaces-IteratorTrait.html#method_key"
}, {
"fqsen": "\\OCC\\Basics\\Interfaces\\IteratorTrait\u003A\u003Anext\u0028\u0029",
"name": "next",
"summary": "Move\u0020forward\u0020to\u0020next\u0020item.",
"url": "classes/OCC-Basics-Interfaces-IteratorTrait.html#method_next"
}, {
"fqsen": "\\OCC\\Basics\\Interfaces\\IteratorTrait\u003A\u003Aprev\u0028\u0029",
"name": "prev",
"summary": "Move\u0020back\u0020to\u0020previous\u0020item.",
"url": "classes/OCC-Basics-Interfaces-IteratorTrait.html#method_prev"
}, {
"fqsen": "\\OCC\\Basics\\Interfaces\\IteratorTrait\u003A\u003Arewind\u0028\u0029",
"name": "rewind",
"summary": "Rewind\u0020the\u0020iterator\u0020to\u0020the\u0020first\u0020item.",
"url": "classes/OCC-Basics-Interfaces-IteratorTrait.html#method_rewind"
}, {
"fqsen": "\\OCC\\Basics\\Interfaces\\IteratorTrait\u003A\u003Avalid\u0028\u0029",
"name": "valid",
"summary": "Check\u0020if\u0020current\u0020position\u0020is\u0020valid.",
"url": "classes/OCC-Basics-Interfaces-IteratorTrait.html#method_valid"
}, {
"fqsen": "\\OCC\\Basics\\Traits\\Getter",
"name": "Getter",
"summary": "Reads\u0020data\u0020from\u0020inaccessible\u0020properties\u0020by\u0020using\u0020magic\u0020methods.",
"url": "classes/OCC-Basics-Traits-Getter.html"
}, {
"fqsen": "\\OCC\\Basics\\Traits\\Getter\u003A\u003A__get\u0028\u0029",
"name": "__get",
"summary": "Read\u0020data\u0020from\u0020an\u0020inaccessible\u0020property.",
"url": "classes/OCC-Basics-Traits-Getter.html#method___get"
}, {
"fqsen": "\\OCC\\Basics\\Traits\\Getter\u003A\u003A__isset\u0028\u0029",
"name": "__isset",
"summary": "Check\u0020if\u0020an\u0020inaccessible\u0020property\u0020is\u0020set\u0020and\u0020not\u0020empty.",
"url": "classes/OCC-Basics-Traits-Getter.html#method___isset"
}, {
"fqsen": "\\OCC\\Basics\\Traits\\OverloadingGetter",
"name": "OverloadingGetter",
"summary": "Overloads\u0020a\u0020class\u0020with\u0020readable\u0020magic\u0020properties.",
"url": "classes/OCC-Basics-Traits-OverloadingGetter.html"
}, {
"fqsen": "\\OCC\\Basics\\Traits\\OverloadingGetter\u003A\u003A__get\u0028\u0029",
"name": "__get",
"summary": "Read\u0020data\u0020from\u0020an\u0020overloaded\u0020property.",
"url": "classes/OCC-Basics-Traits-OverloadingGetter.html#method___get"
}, {
"fqsen": "\\OCC\\Basics\\Traits\\OverloadingGetter\u003A\u003A__isset\u0028\u0029",
"name": "__isset",
"summary": "Check\u0020if\u0020an\u0020overloaded\u0020property\u0020is\u0020set\u0020and\u0020not\u0020empty.",
"url": "classes/OCC-Basics-Traits-OverloadingGetter.html#method___isset"
}, {
"fqsen": "\\OCC\\Basics\\Traits\\OverloadingSetter",
"name": "OverloadingSetter",
"summary": "Overloads\u0020a\u0020class\u0020with\u0020writable\u0020magic\u0020properties.",
"url": "classes/OCC-Basics-Traits-OverloadingSetter.html"
}, {
"fqsen": "\\OCC\\Basics\\Traits\\OverloadingSetter\u003A\u003A__set\u0028\u0029",
"name": "__set",
"summary": "Write\u0020data\u0020to\u0020an\u0020overloaded\u0020property.",
"url": "classes/OCC-Basics-Traits-OverloadingSetter.html#method___set"
}, {
"fqsen": "\\OCC\\Basics\\Traits\\OverloadingSetter\u003A\u003A__unset\u0028\u0029",
"name": "__unset",
"summary": "Unset\u0020an\u0020overloaded\u0020property.",
"url": "classes/OCC-Basics-Traits-OverloadingSetter.html#method___unset"
}, {
"fqsen": "\\OCC\\Basics\\Traits\\Setter",
"name": "Setter",
"summary": "Writes\u0020data\u0020to\u0020inaccessible\u0020properties\u0020by\u0020using\u0020magic\u0020methods.",
"url": "classes/OCC-Basics-Traits-Setter.html"
}, {
"fqsen": "\\OCC\\Basics\\Traits\\Setter\u003A\u003A__set\u0028\u0029",
"name": "__set",
"summary": "Write\u0020data\u0020to\u0020an\u0020inaccessible\u0020property.",
"url": "classes/OCC-Basics-Traits-Setter.html#method___set"
}, {
"fqsen": "\\OCC\\Basics\\Traits\\Setter\u003A\u003A__unset\u0028\u0029",
"name": "__unset",
"summary": "Unset\u0020an\u0020inaccessible\u0020property.",
"url": "classes/OCC-Basics-Traits-Setter.html#method___unset"
}, {
"fqsen": "\\OCC\\Basics\\Traits\\Singleton",
"name": "Singleton",
"summary": "Allows\u0020just\u0020a\u0020single\u0020instance\u0020of\u0020the\u0020class\u0020using\u0020this\u0020trait.",
"url": "classes/OCC-Basics-Traits-Singleton.html"
}, {
"fqsen": "\\OCC\\Basics\\Traits\\Singleton\u003A\u003AgetInstance\u0028\u0029",
"name": "getInstance",
"summary": "Get\u0020a\u0020singleton\u0020instance\u0020of\u0020this\u0020class.",
"url": "classes/OCC-Basics-Traits-Singleton.html#method_getInstance"
}, {
"fqsen": "\\OCC\\Basics\\Traits\\Singleton\u003A\u003A__construct\u0028\u0029",
"name": "__construct",
"summary": "This\u0020is\u0020a\u0020singleton\u0020class,\u0020thus\u0020the\u0020constructor\u0020is\u0020private.",
"url": "classes/OCC-Basics-Traits-Singleton.html#method___construct"
}, {
"fqsen": "\\OCC\\Basics\\Traits\\Singleton\u003A\u003A__clone\u0028\u0029",
"name": "__clone",
"summary": "This\u0020is\u0020a\u0020singleton\u0020class,\u0020thus\u0020cloning\u0020is\u0020prohibited.",
"url": "classes/OCC-Basics-Traits-Singleton.html#method___clone"
}, {
"fqsen": "\\",
"name": "\\",
"summary": "",
"url": "namespaces/default.html"
}, {
"fqsen": "\\OCC\\Basics\\DataStructures",
"name": "DataStructures",
"summary": "",
"url": "namespaces/occ-basics-datastructures.html"
}, {
"fqsen": "\\OCC\\Basics",
"name": "Basics",
"summary": "",
"url": "namespaces/occ-basics.html"
}, {
"fqsen": "\\OCC",
"name": "OCC",
"summary": "",
"url": "namespaces/occ.html"
}, {
"fqsen": "\\OCC\\Basics\\ErrorHandlers",
"name": "ErrorHandlers",
"summary": "",
"url": "namespaces/occ-basics-errorhandlers.html"
}, {
"fqsen": "\\OCC\\Basics\\Interfaces",
"name": "Interfaces",
"summary": "",
"url": "namespaces/occ-basics-interfaces.html"
}, {
"fqsen": "\\OCC\\Basics\\Traits",
"name": "Traits",
"summary": "",
"url": "namespaces/occ-basics-traits.html"
} ]
);

17
doc/js/template.js Normal file
View File

@ -0,0 +1,17 @@
(function(){
window.addEventListener('load', () => {
const el = document.querySelector('.phpdocumentor-on-this-page__content')
if (!el) {
return;
}
const observer = new IntersectionObserver(
([e]) => {
e.target.classList.toggle("-stuck", e.intersectionRatio < 1);
},
{threshold: [1]}
);
observer.observe(el);
})
})();

316
doc/namespaces/default.html Normal file
View File

@ -0,0 +1,316 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
</ul>
<article class="phpdocumentor-element -namespace">
<h2 class="phpdocumentor-content__title">API Documentation</h2>
<h3 id="toc">
Table of Contents
<a href="namespaces/default.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="namespaces">
Namespaces
<a href="namespaces/default.html#namespaces" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -namespace"><a href="namespaces/occ.html"><abbr title="\OCC">OCC</abbr></a></dt>
</dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="namespaces/default.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,318 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ.html">OCC</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics.html">Basics</a></li>
</ul>
<article class="phpdocumentor-element -namespace">
<h2 class="phpdocumentor-content__title">DataStructures</h2>
<h3 id="toc">
Table of Contents
<a href="namespaces/occ-basics-datastructures.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-classes">
Classes
<a href="namespaces/occ-basics-datastructures.html#toc-classes" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -class"><a href="classes/OCC-Basics-DataStructures-StrictCollection.html"><abbr title="\OCC\Basics\DataStructures\StrictCollection">StrictCollection</abbr></a></dt><dd>A type-sensitive, unsorted collection.</dd> <dt class="phpdocumentor-table-of-contents__entry -class"><a href="classes/OCC-Basics-DataStructures-StrictList.html"><abbr title="\OCC\Basics\DataStructures\StrictList">StrictList</abbr></a></dt><dd>A type-sensitive, taversable list.</dd> <dt class="phpdocumentor-table-of-contents__entry -class"><a href="classes/OCC-Basics-DataStructures-StrictQueue.html"><abbr title="\OCC\Basics\DataStructures\StrictQueue">StrictQueue</abbr></a></dt><dd>A type-sensitive, taversable queue (FIFO).</dd> <dt class="phpdocumentor-table-of-contents__entry -class"><a href="classes/OCC-Basics-DataStructures-StrictStack.html"><abbr title="\OCC\Basics\DataStructures\StrictStack">StrictStack</abbr></a></dt><dd>A type-sensitive, taversable stack (LIFO).</dd> </dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="namespaces/occ-basics-datastructures.html#toc-classes">Classes</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="namespaces/occ-basics-datastructures.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,318 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ.html">OCC</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics.html">Basics</a></li>
</ul>
<article class="phpdocumentor-element -namespace">
<h2 class="phpdocumentor-content__title">ErrorHandlers</h2>
<h3 id="toc">
Table of Contents
<a href="namespaces/occ-basics-errorhandlers.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-classes">
Classes
<a href="namespaces/occ-basics-errorhandlers.html#toc-classes" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -class"><a href="classes/OCC-Basics-ErrorHandlers-ThrowErrorException.html"><abbr title="\OCC\Basics\ErrorHandlers\ThrowErrorException">ThrowErrorException</abbr></a></dt><dd>Throws internal errors as exceptions.</dd> <dt class="phpdocumentor-table-of-contents__entry -class"><a href="classes/OCC-Basics-ErrorHandlers-TriggerExceptionError.html"><abbr title="\OCC\Basics\ErrorHandlers\TriggerExceptionError">TriggerExceptionError</abbr></a></dt><dd>Triggers errors for uncaught exceptions.</dd> </dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="namespaces/occ-basics-errorhandlers.html#toc-classes">Classes</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="namespaces/occ-basics-errorhandlers.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,318 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ.html">OCC</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics.html">Basics</a></li>
</ul>
<article class="phpdocumentor-element -namespace">
<h2 class="phpdocumentor-content__title">Interfaces</h2>
<h3 id="toc">
Table of Contents
<a href="namespaces/occ-basics-interfaces.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-traits">
Traits
<a href="namespaces/occ-basics-interfaces.html#toc-traits" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html"><abbr title="\OCC\Basics\Interfaces\ArrayAccessTrait">ArrayAccessTrait</abbr></a></dt><dd>A generic implementation of the ArrayAccess interface.</dd> <dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-Interfaces-CountableTrait.html"><abbr title="\OCC\Basics\Interfaces\CountableTrait">CountableTrait</abbr></a></dt><dd>A generic implementation of the Countable interface.</dd> <dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-Interfaces-IteratorAggregateTrait.html"><abbr title="\OCC\Basics\Interfaces\IteratorAggregateTrait">IteratorAggregateTrait</abbr></a></dt><dd>A generic implementation of the IteratorAggregate interface.</dd> <dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-Interfaces-IteratorTrait.html"><abbr title="\OCC\Basics\Interfaces\IteratorTrait">IteratorTrait</abbr></a></dt><dd>A generic implementation of the Iterator interface.</dd> </dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="namespaces/occ-basics-interfaces.html#toc-traits">Traits</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="namespaces/occ-basics-interfaces.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,318 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-InterfaceTraits.html" class="">InterfaceTraits</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ.html">OCC</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics.html">Basics</a></li>
</ul>
<article class="phpdocumentor-element -namespace">
<h2 class="phpdocumentor-content__title">InterfaceTraits</h2>
<h3 id="toc">
Table of Contents
<a href="namespaces/occ-basics-interfacetraits.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-traits">
Traits
<a href="namespaces/occ-basics-interfacetraits.html#toc-traits" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-InterfaceTraits-ArrayAccessTrait.html"><abbr title="\OCC\Basics\InterfaceTraits\ArrayAccessTrait">ArrayAccessTrait</abbr></a></dt><dd>A generic implementation of the ArrayAccess interface.</dd> <dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-InterfaceTraits-CountableTrait.html"><abbr title="\OCC\Basics\InterfaceTraits\CountableTrait">CountableTrait</abbr></a></dt><dd>A generic implementation of the Countable interface.</dd> <dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-InterfaceTraits-IteratorAggregateTrait.html"><abbr title="\OCC\Basics\InterfaceTraits\IteratorAggregateTrait">IteratorAggregateTrait</abbr></a></dt><dd>A generic implementation of the IteratorAggregate interface.</dd> <dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-InterfaceTraits-IteratorTrait.html"><abbr title="\OCC\Basics\InterfaceTraits\IteratorTrait">IteratorTrait</abbr></a></dt><dd>A generic implementation of the Iterator interface.</dd> </dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="namespaces/occ-basics-interfacetraits.html#toc-traits">Traits</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="namespaces/occ-basics-interfacetraits.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,318 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ.html">OCC</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ-basics.html">Basics</a></li>
</ul>
<article class="phpdocumentor-element -namespace">
<h2 class="phpdocumentor-content__title">Traits</h2>
<h3 id="toc">
Table of Contents
<a href="namespaces/occ-basics-traits.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-traits">
Traits
<a href="namespaces/occ-basics-traits.html#toc-traits" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-Traits-Getter.html"><abbr title="\OCC\Basics\Traits\Getter">Getter</abbr></a></dt><dd>Reads data from inaccessible properties by using magic methods.</dd> <dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-Traits-OverloadingGetter.html"><abbr title="\OCC\Basics\Traits\OverloadingGetter">OverloadingGetter</abbr></a></dt><dd>Overloads a class with readable magic properties.</dd> <dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-Traits-OverloadingSetter.html"><abbr title="\OCC\Basics\Traits\OverloadingSetter">OverloadingSetter</abbr></a></dt><dd>Overloads a class with writable magic properties.</dd> <dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-Traits-Setter.html"><abbr title="\OCC\Basics\Traits\Setter">Setter</abbr></a></dt><dd>Writes data to inaccessible properties by using magic methods.</dd> <dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-Traits-Singleton.html"><abbr title="\OCC\Basics\Traits\Singleton">Singleton</abbr></a></dt><dd>Allows just a single instance of the class using this trait.</dd> </dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="namespaces/occ-basics-traits.html#toc-traits">Traits</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="namespaces/occ-basics-traits.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,320 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="-active">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="namespaces/occ.html">OCC</a></li>
</ul>
<article class="phpdocumentor-element -namespace">
<h2 class="phpdocumentor-content__title">Basics</h2>
<h3 id="toc">
Table of Contents
<a href="namespaces/occ-basics.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="namespaces">
Namespaces
<a href="namespaces/occ-basics.html#namespaces" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -namespace"><a href="namespaces/occ-basics-datastructures.html"><abbr title="\OCC\Basics\DataStructures">DataStructures</abbr></a></dt>
<dt class="phpdocumentor-table-of-contents__entry -namespace"><a href="namespaces/occ-basics-errorhandlers.html"><abbr title="\OCC\Basics\ErrorHandlers">ErrorHandlers</abbr></a></dt>
<dt class="phpdocumentor-table-of-contents__entry -namespace"><a href="namespaces/occ-basics-interfaces.html"><abbr title="\OCC\Basics\Interfaces">Interfaces</abbr></a></dt>
<dt class="phpdocumentor-table-of-contents__entry -namespace"><a href="namespaces/occ-basics-traits.html"><abbr title="\OCC\Basics\Traits">Traits</abbr></a></dt>
</dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="namespaces/occ-basics.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

316
doc/namespaces/occ.html Normal file
View File

@ -0,0 +1,316 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="-active">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
</ul>
<article class="phpdocumentor-element -namespace">
<h2 class="phpdocumentor-content__title">OCC</h2>
<h3 id="toc">
Table of Contents
<a href="namespaces/occ.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="namespaces">
Namespaces
<a href="namespaces/occ.html#namespaces" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -namespace"><a href="namespaces/occ-basics.html"><abbr title="\OCC\Basics">Basics</abbr></a></dt>
</dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="namespaces/occ.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,317 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="-active">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="packages/Basics.html">Basics</a></li>
</ul>
<article class="phpdocumentor-element -package">
<h2 class="phpdocumentor-content__title">DataStructures</h2>
<h3 id="toc">
Table of Contents
<a href="packages/Basics-DataStructures.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-classes">
Classes
<a href="packages/Basics-DataStructures.html#toc-classes" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -class"><a href="classes/OCC-Basics-DataStructures-StrictCollection.html"><abbr title="\OCC\Basics\DataStructures\StrictCollection">StrictCollection</abbr></a></dt><dd>A type-sensitive, unsorted collection.</dd> <dt class="phpdocumentor-table-of-contents__entry -class"><a href="classes/OCC-Basics-DataStructures-StrictList.html"><abbr title="\OCC\Basics\DataStructures\StrictList">StrictList</abbr></a></dt><dd>A type-sensitive, taversable list.</dd> <dt class="phpdocumentor-table-of-contents__entry -class"><a href="classes/OCC-Basics-DataStructures-StrictQueue.html"><abbr title="\OCC\Basics\DataStructures\StrictQueue">StrictQueue</abbr></a></dt><dd>A type-sensitive, taversable queue (FIFO).</dd> <dt class="phpdocumentor-table-of-contents__entry -class"><a href="classes/OCC-Basics-DataStructures-StrictStack.html"><abbr title="\OCC\Basics\DataStructures\StrictStack">StrictStack</abbr></a></dt><dd>A type-sensitive, taversable stack (LIFO).</dd> </dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="packages/Basics-DataStructures.html#toc-classes">Classes</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="packages/Basics-DataStructures.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,317 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="-active">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="packages/Basics.html">Basics</a></li>
</ul>
<article class="phpdocumentor-element -package">
<h2 class="phpdocumentor-content__title">ErrorHandlers</h2>
<h3 id="toc">
Table of Contents
<a href="packages/Basics-ErrorHandlers.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-classes">
Classes
<a href="packages/Basics-ErrorHandlers.html#toc-classes" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -class"><a href="classes/OCC-Basics-ErrorHandlers-ThrowErrorException.html"><abbr title="\OCC\Basics\ErrorHandlers\ThrowErrorException">ThrowErrorException</abbr></a></dt><dd>Throws internal errors as exceptions.</dd> <dt class="phpdocumentor-table-of-contents__entry -class"><a href="classes/OCC-Basics-ErrorHandlers-TriggerExceptionError.html"><abbr title="\OCC\Basics\ErrorHandlers\TriggerExceptionError">TriggerExceptionError</abbr></a></dt><dd>Triggers errors for uncaught exceptions.</dd> </dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="packages/Basics-ErrorHandlers.html#toc-classes">Classes</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="packages/Basics-ErrorHandlers.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,317 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-InterfaceTraits.html" class="-active">InterfaceTraits</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="packages/Basics.html">Basics</a></li>
</ul>
<article class="phpdocumentor-element -package">
<h2 class="phpdocumentor-content__title">InterfaceTraits</h2>
<h3 id="toc">
Table of Contents
<a href="packages/Basics-InterfaceTraits.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-traits">
Traits
<a href="packages/Basics-InterfaceTraits.html#toc-traits" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-InterfaceTraits-ArrayAccessTrait.html"><abbr title="\OCC\Basics\InterfaceTraits\ArrayAccessTrait">ArrayAccessTrait</abbr></a></dt><dd>A generic implementation of the ArrayAccess interface.</dd> <dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-InterfaceTraits-CountableTrait.html"><abbr title="\OCC\Basics\InterfaceTraits\CountableTrait">CountableTrait</abbr></a></dt><dd>A generic implementation of the Countable interface.</dd> <dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-InterfaceTraits-IteratorAggregateTrait.html"><abbr title="\OCC\Basics\InterfaceTraits\IteratorAggregateTrait">IteratorAggregateTrait</abbr></a></dt><dd>A generic implementation of the IteratorAggregate interface.</dd> <dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-InterfaceTraits-IteratorTrait.html"><abbr title="\OCC\Basics\InterfaceTraits\IteratorTrait">IteratorTrait</abbr></a></dt><dd>A generic implementation of the Iterator interface.</dd> </dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="packages/Basics-InterfaceTraits.html#toc-traits">Traits</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="packages/Basics-InterfaceTraits.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,317 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="-active">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="packages/Basics.html">Basics</a></li>
</ul>
<article class="phpdocumentor-element -package">
<h2 class="phpdocumentor-content__title">Interfaces</h2>
<h3 id="toc">
Table of Contents
<a href="packages/Basics-Interfaces.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-traits">
Traits
<a href="packages/Basics-Interfaces.html#toc-traits" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-Interfaces-ArrayAccessTrait.html"><abbr title="\OCC\Basics\Interfaces\ArrayAccessTrait">ArrayAccessTrait</abbr></a></dt><dd>A generic implementation of the ArrayAccess interface.</dd> <dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-Interfaces-CountableTrait.html"><abbr title="\OCC\Basics\Interfaces\CountableTrait">CountableTrait</abbr></a></dt><dd>A generic implementation of the Countable interface.</dd> <dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-Interfaces-IteratorAggregateTrait.html"><abbr title="\OCC\Basics\Interfaces\IteratorAggregateTrait">IteratorAggregateTrait</abbr></a></dt><dd>A generic implementation of the IteratorAggregate interface.</dd> <dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-Interfaces-IteratorTrait.html"><abbr title="\OCC\Basics\Interfaces\IteratorTrait">IteratorTrait</abbr></a></dt><dd>A generic implementation of the Iterator interface.</dd> </dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="packages/Basics-Interfaces.html#toc-traits">Traits</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="packages/Basics-Interfaces.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

View File

@ -0,0 +1,317 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="-active">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="packages/Basics.html">Basics</a></li>
</ul>
<article class="phpdocumentor-element -package">
<h2 class="phpdocumentor-content__title">Traits</h2>
<h3 id="toc">
Table of Contents
<a href="packages/Basics-Traits.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-traits">
Traits
<a href="packages/Basics-Traits.html#toc-traits" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-Traits-Getter.html"><abbr title="\OCC\Basics\Traits\Getter">Getter</abbr></a></dt><dd>Reads data from inaccessible properties by using magic methods.</dd> <dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-Traits-OverloadingGetter.html"><abbr title="\OCC\Basics\Traits\OverloadingGetter">OverloadingGetter</abbr></a></dt><dd>Overloads a class with readable magic properties.</dd> <dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-Traits-OverloadingSetter.html"><abbr title="\OCC\Basics\Traits\OverloadingSetter">OverloadingSetter</abbr></a></dt><dd>Overloads a class with writable magic properties.</dd> <dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-Traits-Setter.html"><abbr title="\OCC\Basics\Traits\Setter">Setter</abbr></a></dt><dd>Writes data to inaccessible properties by using magic methods.</dd> <dt class="phpdocumentor-table-of-contents__entry -trait"><a href="classes/OCC-Basics-Traits-Singleton.html"><abbr title="\OCC\Basics\Traits\Singleton">Singleton</abbr></a></dt><dd>Allows just a single instance of the class using this trait.</dd> </dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="packages/Basics-Traits.html#toc-traits">Traits</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="packages/Basics-Traits.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

319
doc/packages/Basics.html Normal file
View File

@ -0,0 +1,319 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="-active">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
</ul>
<article class="phpdocumentor-element -package">
<h2 class="phpdocumentor-content__title">Basics</h2>
<h3 id="toc">
Table of Contents
<a href="packages/Basics.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="packages">
Packages
<a href="packages/Basics.html#packages" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -package"><a href="packages/Basics-DataStructures.html"><abbr title="\Basics\DataStructures">DataStructures</abbr></a></dt>
<dt class="phpdocumentor-table-of-contents__entry -package"><a href="packages/Basics-ErrorHandlers.html"><abbr title="\Basics\ErrorHandlers">ErrorHandlers</abbr></a></dt>
<dt class="phpdocumentor-table-of-contents__entry -package"><a href="packages/Basics-Interfaces.html"><abbr title="\Basics\Interfaces">Interfaces</abbr></a></dt>
<dt class="phpdocumentor-table-of-contents__entry -package"><a href="packages/Basics-Traits.html"><abbr title="\Basics\Traits">Traits</abbr></a></dt>
</dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="packages/Basics.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

316
doc/packages/default.html Normal file
View File

@ -0,0 +1,316 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP Basics</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
</ul>
<article class="phpdocumentor-element -package">
<h2 class="phpdocumentor-content__title">API Documentation</h2>
<h3 id="toc">
Table of Contents
<a href="packages/default.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="packages">
Packages
<a href="packages/default.html#packages" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -package"><a href="packages/Basics.html"><abbr title="\Basics">Basics</abbr></a></dt>
</dl>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="packages/default.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

184
doc/reports/deprecated.html Normal file
View File

@ -0,0 +1,184 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title> PHP Basics &raquo; Deprecated elements
</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
<li><a href="">Home</a></li>
</ul>
<div class="phpdocumentor-row">
<h2 class="phpdocumentor-content__title">Deprecated</h2>
<div class="phpdocumentor-admonition phpdocumentor-admonition--success">
No deprecated elements have been found in this project.
</div>
</div>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="reports/deprecated.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

183
doc/reports/errors.html Normal file
View File

@ -0,0 +1,183 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title> PHP Basics &raquo; Compilation errors
</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
<li><a href="">Home</a></li>
</ul>
<div class="phpdocumentor-row">
<h2 class="phpdocumentor-content__title">Errors</h2>
<div class="phpdocumentor-admonition phpdocumentor-admonition--success">No errors have been found in this project.</div>
</div>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="reports/errors.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>

184
doc/reports/markers.html Normal file
View File

@ -0,0 +1,184 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title> PHP Basics &raquo; Markers
</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">PHP Basics</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://packagist.org/packages/opencultureconsulting/basics">
<span>
<i class="fab fa-php"></i>
</span>
</a>
</li>
<li class="phpdocumentor-topnav__menu-item -menu">
<a href="https://github.com/opencultureconsulting/php-basics">
<span>
<i class="fab fa-github"></i>
</span>
</a>
</li>
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Documentation</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/installation/index.html#installation" class="">Installation</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="guides/installation/test.html#test" class="">Test</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="guides/changelog/index.html#changelog" class="">Changelog</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/occ.html" class="">OCC</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/occ-basics.html" class="">Basics</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/Basics.html" class="">Basics</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/Basics-DataStructures.html" class="">DataStructures</a>
</li>
<li>
<a href="packages/Basics-ErrorHandlers.html" class="">ErrorHandlers</a>
</li>
<li>
<a href="packages/Basics-Interfaces.html" class="">Interfaces</a>
</li>
<li>
<a href="packages/Basics-Traits.html" class="">Traits</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
<li><a href="">Home</a></li>
</ul>
<div class="phpdocumentor-row">
<h2 class="phpdocumentor-content__title">Markers</h2>
<div class="phpdocumentor-admonition phpdocumentor-admonition--success">
No markers have been found in this project.
</div>
</div>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="reports/markers.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>