Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
stefangabos committed Dec 30, 2024
1 parent 0095d1a commit eebc42d
Show file tree
Hide file tree
Showing 5 changed files with 186 additions and 8 deletions.
23 changes: 18 additions & 5 deletions docs/Zebra_Database/Zebra_Database.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
<ul>
<li><a href="../Zebra_Database/Zebra_Database.html">Zebra_Database</a></li>
</ul>
<p><strong>Files:</strong></p><ul>
<li><a href="../Zebra_Database/_update-debug-info.php.html">update-debug-info.php</a></li>
<li><a href="../Zebra_Database/_Zebra_Database.php.html">Zebra_Database.php</a></li>
</ul>
<p class="hello-separator"></p>
<p class="hello">
<img src="https://avatars1.githubusercontent.com/u/741165?s=460&u=95c38afa1015f9ed705f3ad9848b3c2687b547db&v=4" width="131" alt="Stefan Gabos">
Expand All @@ -65,7 +69,7 @@ <h4>Author(s):</h4>
</ul>
<h4>Version:</h4>
<ul>
<li>2.12.0 (last revision: November 13, 2024)<br>See <a href="https://github.com/stefangabos/Zebra_Database/blob/master/CHANGELOG.md" class="projects-homepage">CHANGELOG</a></li>
<li>3.0.0 (last revision: December 29, 2024)<br>See <a href="https://github.com/stefangabos/Zebra_Database/blob/master/CHANGELOG.md" class="projects-homepage">CHANGELOG</a></li>
</ul>
<h4>License:</h4>
<ul>
Expand Down Expand Up @@ -310,10 +314,19 @@ <h5>Tags</h5>
<a href="#top" class="top">top</a>
<div class="clear"></div>
</div>
<h4 id="var$debug_ajax" class="variable"><span><em>boolean</em></span> $debug_ajax = <span class="value">false</span><span class="access public">public</span></h4>
<h4 id="var$debug_ajax" class="variable"><span><em>string</em></span> $debug_ajax = <span class="value">false</span><span class="access public">public</span></h4>
<div class="doc_block">
<p>Enables logging of queries done through AJAX requests.</p>
<p>When set to <code>TRUE</code> all AJAX requests sent by your page will be captured and checked for logs generated by <code>Zebra Database</code>.</p><p class="highlight">Note that when this is enabled HTML code will be appended to the result of the AJAX requests!<br>Therefore, depending on your use-case, having this enabled could break some of your page's functionality.</p><p>Default is <code>FALSE</code></p>
<p>Enables logging of queries run through AJAX requests.</p>
<p>The property's value needs to be set to the path where the <code>update-debug-info.php</code> file would be accessible via a <code>GET</code> <code>AJAX</code> request.</p><p>Can be both a relative or an absolute path.</p><ol class="code"><li><div class="src-line"><span class="src-var">$debug_ajax&nbsp;</span>=&nbsp;<span class="src-str">'./update-debug-info.php'</span><span class="src-sym">;</span></div></li>
</ol><p class="highlight">You need to move the <code>update-debug-info.php</code> file from the library's root folder to location accessible by an AJAX GET request. Additionally, you can rename the file to whatever suits your needs - or use whatever technique you want, as long as the file is publicly accessible and its content is unchanged.</p><p>How this works:</p><p><ul><li>when this feature is enabled, the library's JavaScript creates a hook that appends a custom <a href="https://developer.mozilla.org/en-US/docs/Glossary/Request_header">request header</a>
to <strong>all</strong> subsequent AJAX requests; the header, named <code>zdb_log_id</code>, will contain a 12-character long random
numerical value; this value serves both as a flag indicating that the library's instances in these requests
should generate debug information to be relayed back to the &quot;main&quot; script, and as an identifier for the
temporary file holding the debug information (read on)</li></ul> <ul><li>AJAX requests using the library will use this value to write debug information to a temporary file named
<code>zdb-log-[numeric value from request header]</code> in the system's temporary folder (as returned by <a href="http://www.php.net/sys_get_temp_dir">sys_get_temp_dir</a>);</li></ul> <ul><li>for all terminating AJAX request, the library's JavaScript will make an additional AJAX call to the <code>update-debug-info.php</code>
file (at the path specified by <a href="../Zebra_Database/Zebra_Database.html#var$debug_ajax">debug_ajax</a>); this file will check the system's temporary folder for the
corresponding temporary file, as described above; if the file exists, it will fetch the debug information from it,
delete the temporary file, and inject the debug information into the debug console</li></ul><p class="highlight">Note that this will work only if the <a href="../Zebra_Database/Zebra_Database.html#var$debug">$debug</a> property is set to <code>TRUE</code> both in the &quot;main&quot; file as well as in the file that is being called through AJAX.</p><p class="highlight">This needs to be set only for the &quot;main&quot; script; setting it for the files called through AJAX has no effect.</p><p>Default is <code>FALSE</code></p>
<h5>Tags</h5>
<table>
<tr>
Expand Down Expand Up @@ -3145,7 +3158,7 @@ <h5>Tags</h5>
</tr>
</table>
<div id="doc_footer">
Documentation generated on <span>Wed, 13 November 2024</span>
Documentation generated on <span>Mon, 30 December 2024</span>
</div>
</div>
<!-- Google tag (gtag.js) --><script async src="https://www.googletagmanager.com/gtag/js?id=G-0301ZD47Q7"></script><script>window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'G-0301ZD47Q7');</script></body>
Expand Down
79 changes: 79 additions & 0 deletions docs/Zebra_Database/_Zebra_Database.php.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Zebra_Database - a compact, lightweight and feature-rich PHP MySQLi database wrapper - Docs for page Zebra_Database.php</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
<link rel="shortcut icon" href="/Zebra_Database/favicon.ico">
<link rel="stylesheet" type="text/css" href="../media/reset.css">
<link rel="stylesheet" type="text/css" href="../media/style.css">
</head>
<body>
<div id="doc_header">
<a href="https://github.com/stefangabos/Zebra_Database" class="projects-homepage">
<img src="../media/zebra-logo.png" width="35" height="32" alt="Zebra_Database" >
<a href="https://github.com/stefangabos/Zebra_Database" class="projects-homepage">Zebra Database</a>
</a>
<ul class="notype float">
<!--
<li><a href="../classtrees_Zebra_Database.html">class tree: Zebra_Database</a></li>
-->
<li><a href="../elementindex_Zebra_Database.html">Element index</a></li>
<!--
<li class="last"><a href="../elementindex.html">all elements</a></li>
-->
</ul>
<div class="clear"></div>
</div>
<div id="phpdoc">
<table class="stretch">
<tr>
<td class="sidebar">
<div id="doc_sidebar">
<p><strong>Project's homepage</strong></p>
<ul>
<li>
<a href="https://github.com/stefangabos/Zebra_Database" class="projects-homepage">Zebra Database</a>
</li>
</ul>
<p><strong>Classes:</strong></p>
<ul>
<li><a href="../Zebra_Database/Zebra_Database.html">Zebra_Database</a></li>
</ul>
<p><strong>Files:</strong></p><ul>
<li><a href="../Zebra_Database/_update-debug-info.php.html">update-debug-info.php</a></li>
<li><a href="../Zebra_Database/_Zebra_Database.php.html">Zebra_Database.php</a></li>
</ul>
<p class="hello-separator"></p>
<p class="hello">
<img src="https://avatars1.githubusercontent.com/u/741165?s=460&u=95c38afa1015f9ed705f3ad9848b3c2687b547db&v=4" width="131" alt="Stefan Gabos">
Hi there!
<br><br>
That's me, Stefan Gabos, the author of this library.
<br><br>
If you like this project, please <a href="https://github.com/stefangabos/Zebra_Database" class="projects-homepage">star it on GitHub</a><strong>thank you</strong>!
<br><br>
I have a few other projects that you might be interested in — <a href="https://github.com/stefangabos">check them out</a> if you have the time.
</p>
</div>
</td>
<td style="background: #FFF">
<div id="doc_content">
<h2>File: <strong>Zebra_Database.php</strong></h2>
<h6><strong>source file:</strong> /Zebra_Database.php</h6>
<a name="top"></a>
<h3>Classes:</h3>
<dl>
<dt><a href="../Zebra_Database/Zebra_Database.html">Zebra_Database</a></dt>
<dd>A compact, lightweight yet feature-rich PHP MySQLi database wrapper providing methods for interacting with MySQL databases that are more secure, powerful and intuitive than PHP's default ones.</dd>
</dl>
</div>
</td>
</tr>
</table>
<div id="doc_footer">
Documentation generated on <span>Mon, 30 December 2024</span>
</div>
</div>
<!-- Google tag (gtag.js) --><script async src="https://www.googletagmanager.com/gtag/js?id=G-0301ZD47Q7"></script><script>window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'G-0301ZD47Q7');</script></body>
</html>
76 changes: 76 additions & 0 deletions docs/Zebra_Database/_update-debug-info.php.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Zebra_Database - a compact, lightweight and feature-rich PHP MySQLi database wrapper - Docs for page update-debug-info.php</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
<link rel="shortcut icon" href="/Zebra_Database/favicon.ico">
<link rel="stylesheet" type="text/css" href="../media/reset.css">
<link rel="stylesheet" type="text/css" href="../media/style.css">
</head>
<body>
<div id="doc_header">
<a href="https://github.com/stefangabos/Zebra_Database" class="projects-homepage">
<img src="../media/zebra-logo.png" width="35" height="32" alt="Zebra_Database" >
<a href="https://github.com/stefangabos/Zebra_Database" class="projects-homepage">Zebra Database</a>
</a>
<ul class="notype float">
<!--
<li><a href="../classtrees_Zebra_Database.html">class tree: Zebra_Database</a></li>
-->
<li><a href="../elementindex_Zebra_Database.html">Element index</a></li>
<!--
<li class="last"><a href="../elementindex.html">all elements</a></li>
-->
</ul>
<div class="clear"></div>
</div>
<div id="phpdoc">
<table class="stretch">
<tr>
<td class="sidebar">
<div id="doc_sidebar">
<p><strong>Project's homepage</strong></p>
<ul>
<li>
<a href="https://github.com/stefangabos/Zebra_Database" class="projects-homepage">Zebra Database</a>
</li>
</ul>
<p><strong>Classes:</strong></p>
<ul>
<li><a href="../Zebra_Database/Zebra_Database.html">Zebra_Database</a></li>
</ul>
<p><strong>Files:</strong></p><ul>
<li><a href="../Zebra_Database/_update-debug-info.php.html">update-debug-info.php</a></li>
<li><a href="../Zebra_Database/_Zebra_Database.php.html">Zebra_Database.php</a></li>
</ul>
<p class="hello-separator"></p>
<p class="hello">
<img src="https://avatars1.githubusercontent.com/u/741165?s=460&u=95c38afa1015f9ed705f3ad9848b3c2687b547db&v=4" width="131" alt="Stefan Gabos">
Hi there!
<br><br>
That's me, Stefan Gabos, the author of this library.
<br><br>
If you like this project, please <a href="https://github.com/stefangabos/Zebra_Database" class="projects-homepage">star it on GitHub</a><strong>thank you</strong>!
<br><br>
I have a few other projects that you might be interested in — <a href="https://github.com/stefangabos">check them out</a> if you have the time.
</p>
</div>
</td>
<td style="background: #FFF">
<div id="doc_content">
<h2>File: <strong>update-debug-info.php</strong></h2>
<h6><strong>source file:</strong> /update-debug-info.php</h6>
<a name="top"></a>
<p>This file is required when <a href="../Zebra_Database/Zebra_Database.html#var$debug_ajax">debug_ajax</a> is enabled.</p>
<p><p class="highlight">You need to move the <code>update-debug-info.php</code> file from the library's root folder to location accessible by an AJAX GET request. Additionally, you can rename the file to whatever suits your needs - or use whatever technique you want, as long as the file is publicly accessible and its content is unchanged.</p><p>Read more <a href="../Zebra_Database/Zebra_Database.html#var$debug_ajax">here</a>.</p>
</div>
</td>
</tr>
</table>
<div id="doc_footer">
Documentation generated on <span>Mon, 30 December 2024</span>
</div>
</div>
<!-- Google tag (gtag.js) --><script async src="https://www.googletagmanager.com/gtag/js?id=G-0301ZD47Q7"></script><script>window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'G-0301ZD47Q7');</script></body>
</html>
10 changes: 8 additions & 2 deletions docs/elementindex_Zebra_Database.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
<ul>
<li><a href="Zebra_Database/Zebra_Database.html">Zebra_Database</a></li>
</ul>
<p><strong>Files:</strong></p><ul>
<li><a href="Zebra_Database/_update-debug-info.php.html">update-debug-info.php</a></li>
<li><a href="Zebra_Database/_Zebra_Database.php.html">Zebra_Database.php</a></li>
</ul>
<p class="hello-separator"></p>
<p class="hello">
<img src="https://avatars1.githubusercontent.com/u/741165?s=460&u=95c38afa1015f9ed705f3ad9848b3c2687b547db&v=4" width="131" alt="Stefan Gabos">
Expand Down Expand Up @@ -120,7 +124,7 @@ <h3 id="d">d</h3>
<dt>$debugger_ip</dt>
<dd>in file Zebra_Database.php, variable <a href="Zebra_Database/Zebra_Database.html#var$debugger_ip">Zebra_Database::$debugger_ip</a><br>&nbsp;&nbsp;&nbsp;&nbsp;An array of IP addresses for which to show the debugging console / write to log file, if the <a href="Zebra_Database/Zebra_Database.html#var$debug">debug</a> property is <strong>not</strong> set to <code>FALSE</code>.</dd>
<dt>$debug_ajax</dt>
<dd>in file Zebra_Database.php, variable <a href="Zebra_Database/Zebra_Database.html#var$debug_ajax">Zebra_Database::$debug_ajax</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Enables logging of queries done through AJAX requests.</dd>
<dd>in file Zebra_Database.php, variable <a href="Zebra_Database/Zebra_Database.html#var$debug_ajax">Zebra_Database::$debug_ajax</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Enables logging of queries run through AJAX requests.</dd>
<dt>$debug_cookie_name</dt>
<dd>in file Zebra_Database.php, variable <a href="Zebra_Database/Zebra_Database.html#var$debug_cookie_name">Zebra_Database::$debug_cookie_name</a><br>&nbsp;&nbsp;&nbsp;&nbsp;If debugging is enabled on the fly via the presence of a query string argument (see the <a href="Zebra_Database/Zebra_Database.html#var$debug">debug</a> property), a cookie is set so that the query string is not required to be present in subsequent requests.</dd>
<dt>$debug_info</dt>
Expand Down Expand Up @@ -352,6 +356,8 @@ <h3 id="u">u</h3>
<dl>
<dt>update</dt>
<dd>in file Zebra_Database.php, method <a href="Zebra_Database/Zebra_Database.html#methodupdate">Zebra_Database::update()</a><br>&nbsp;&nbsp;&nbsp;&nbsp;Shorthand for <code>UPDATE</code> queries</dd>
<dt>update-debug-info.php</dt>
<dd>procedural page <a href="Zebra_Database/_update-debug-info.php.html">update-debug-info.php</a></dd>
</dl>
</div>
<a href="elementindex_Zebra_Database.html#top" class="top">top</a>
Expand All @@ -373,7 +379,7 @@ <h3 id="z">z</h3>
</tr>
</table>
<div id="doc_footer">
Documentation generated on <span>Wed, 13 November 2024</span>
Documentation generated on <span>Mon, 30 December 2024</span>
</div>
</div>
<!-- Google tag (gtag.js) --><script async src="https://www.googletagmanager.com/gtag/js?id=G-0301ZD47Q7"></script><script>window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'G-0301ZD47Q7');</script></body>
Expand Down
6 changes: 5 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
<ul>
<li><a href="Zebra_Database/Zebra_Database.html">Zebra_Database</a></li>
</ul>
<p><strong>Files:</strong></p><ul>
<li><a href="Zebra_Database/_update-debug-info.php.html">update-debug-info.php</a></li>
<li><a href="Zebra_Database/_Zebra_Database.php.html">Zebra_Database.php</a></li>
</ul>
<p class="hello-separator"></p>
<p class="hello">
<img src="https://avatars1.githubusercontent.com/u/741165?s=460&u=95c38afa1015f9ed705f3ad9848b3c2687b547db&v=4" width="131" alt="Stefan Gabos">
Expand All @@ -63,7 +67,7 @@ <h2>Zebra_Database - a compact, lightweight and feature-rich PHP MySQLi database
</tr>
</table>
<div id="doc_footer">
Documentation generated on <span>Wed, 13 November 2024</span>
Documentation generated on <span>Mon, 30 December 2024</span>
</div>
</div>
<!-- Google tag (gtag.js) --><script async src="https://www.googletagmanager.com/gtag/js?id=G-0301ZD47Q7"></script><script>window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'G-0301ZD47Q7');</script></body>
Expand Down

0 comments on commit eebc42d

Please sign in to comment.