Blame | Last modification | View Log | Download | RSS feed
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Documentation</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=Source+Sans+Pro:wght@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/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">Documentation</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">
</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 -four phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
</section>
<section class="phpdocumentor-sidebar__category">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="packages/Application.html"><abbr title="\Application">Application</abbr></a></h3>
</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 -eight phpdocumentor-content">
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
</ul>
<article class="phpdocumentor-element -class">
<h2 class="phpdocumentor-content__title">
usersDataSourceMySQLi
<span class="phpdocumentor-element__extends">
extends <a href="classes/usersDataSource.html"><abbr title="\usersDataSource">usersDataSource</abbr></a>
</span>
<div class="phpdocumentor-element__package">
in package
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
</ul>
</div>
</h2>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="UsersDataSourceMySQLi.class.php"><a href="files/usersdatasourcemysqli-class.html"><abbr title="UsersDataSourceMySQLi.class.php">UsersDataSourceMySQLi.class.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">65</span>
</aside>
<p class="phpdocumentor-summary">usersDataSource class</p>
<section class="phpdocumentor-description"><p>usersDataSource provides the data access capabilities for the Users
class.</p>
<p>To build a data access class for Users, the following 5 methods must
exist.
getPassword(username)
getAllUsers()
getARecord
update</p>
<p>Additionally, where appropriate, the following function is useful
buildTable()</p>
<p>This particular instance provides an interface to MySQL using
the mysqli libraries.</p>
<p>Create an instance of this, then pass the variable to several Users
calls.</p>
</section>
<h3 id="toc">
Table of Contents
<a href="#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -property -protected">
<a href="classes/usersDataSourceMySQLi.html#property_configuration">$configuration</a>
<span>
: array<string|int, string> </span>
</dt>
<dd></dd>
<dt class="phpdocumentor-table-of-contents__entry -property -protected">
<a href="classes/usersDataSourceMySQLi.html#property_dbConnection">$dbConnection</a>
<span>
: <abbr title="\mysqli">mysqli</abbr> </span>
</dt>
<dd></dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/usersDataSourceMySQLi.html#method___construct">__construct()</a>
<span>
: null </span>
</dt>
<dd>constructor for an instance of the class</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/usersDataSourceMySQLi.html#method_buildTable">buildTable()</a>
<span>
: mixed </span>
</dt>
<dd>Convenience function to create the tables defined in $configuration</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/usersDataSourceMySQLi.html#method_getAllUsers">getAllUsers()</a>
<span>
: array<string|int, string> </span>
</dt>
<dd>retrieves all users from the database</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/usersDataSourceMySQLi.html#method_getARecord">getARecord()</a>
<span>
: array<string|int, string> </span>
</dt>
<dd>Get a record from the database</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/usersDataSourceMySQLi.html#method_getPassword">getPassword()</a>
<span>
: array<string|int, string> </span>
</dt>
<dd>Retrieves the password field from table</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/usersDataSourceMySQLi.html#method_getUserID">getUserID()</a>
<span>
: int </span>
</dt>
<dd>retrieves the userID from the table</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/usersDataSourceMySQLi.html#method_initTables">initTables()</a>
<span>
: mixed </span>
</dt>
<dd>Convenience function to initialize tables to values</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/usersDataSourceMySQLi.html#method_test">test()</a>
<span>
: bool </span>
</dt>
<dd>Tests that the database connection works and the table is built</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a href="classes/usersDataSourceMySQLi.html#method_update">update()</a>
<span>
: <abbr title="\mysqli_result">mysqli_result</abbr>|bool </span>
</dt>
<dd>updates row in database with $newData</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -protected">
<a href="classes/usersDataSourceMySQLi.html#method_buildQuery">buildQuery()</a>
<span>
: string </span>
</dt>
<dd>Create a query to retrieve info from database</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -protected">
<a href="classes/usersDataSourceMySQLi.html#method_doSQL">doSQL()</a>
<span>
: mixed </span>
</dt>
<dd>Executes an SQL statement, returning the result</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -protected">
<a href="classes/usersDataSourceMySQLi.html#method_escapeString">escapeString()</a>
<span>
: string </span>
</dt>
<dd>Make string safe for MySQL</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -protected">
<a href="classes/usersDataSourceMySQLi.html#method_getAField">getAField()</a>
<span>
: mixed </span>
</dt>
<dd>Gets a single field from a table</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -protected">
<a href="classes/usersDataSourceMySQLi.html#method_setDBConnection">setDBConnection()</a>
<span>
: <abbr title="\mysqli">mysqli</abbr>|false </span>
</dt>
<dd>Make the database connection</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -protected">
<a href="classes/usersDataSourceMySQLi.html#method_tableColumnName">tableColumnName()</a>
<span>
: string </span>
</dt>
<dd>Gets the actual database column name from the configuration file</dd>
</dl>
<section class="phpdocumentor-properties">
<h3 class="phpdocumentor-elements__header" id="properties">
Properties
<a href="classes/usersDataSourceMySQLi.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<article
class="
phpdocumentor-element
-property
-protected
"
>
<h4 class="phpdocumentor-element__name" id="property_configuration">
$configuration
<a href="classes/usersDataSourceMySQLi.html#property_configuration" class="headerlink"><i class="fas fa-link"></i></a>
<span class="phpdocumentor-element__modifiers">
</span>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="UsersDataSourceMySQLi.class.php"><a href="files/usersdatasourcemysqli-class.html"><abbr title="UsersDataSourceMySQLi.class.php">UsersDataSourceMySQLi.class.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">72</span>
</aside>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">protected</span>
<span class="phpdocumentor-signature__type">array<string|int, string></span>
<span class="phpdocumentor-signature__name">$configuration</span>
= <span class="phpdocumentor-signature__default-value">array('tables' => array('users' => array(
'table' => '_users',
// table name for user records
'id' => '_user_id',
// ID column name
'display' => array(
// fields which are displayed to select
'login',
),
'password' => array(
// These fields are stored encrypted
'pass',
),
'fields' => array('login' => array(
'dbColumn' => 'login',
// login name column name
'type' => 'varchar',
'size' => 64,
'required' => rue,
'unique' => rue,
), 'pass' => array(
'dbColumn' => 'password',
// password column name
'type' => 'varchar',
'size' => 128,
'required' => rue,
), 'admin' => array('dbColumn' => 'isAdmin', 'type' => 'boolean', 'required' => rue, 'default' => '0&am
p;#039;), 'enabled' => array('dbColumn' => 'enabled', 'type' => 'boolean', 'required' => rue, 'default' => '1OR="#A020F0">'
)),
)))</span></code>
<section class="phpdocumentor-description"><p>Contains the configuration for the class</p>
<p>May be modified by the calling program. Must be replicated in userDataSource class</p>
</section>
</article>
<article
class="
phpdocumentor-element
-property
-protected
"
>
<h4 class="phpdocumentor-element__name" id="property_dbConnection">
$dbConnection
<a href="classes/usersDataSourceMySQLi.html#property_dbConnection" class="headerlink"><i class="fas fa-link"></i></a>
<span class="phpdocumentor-element__modifiers">
</span>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="UsersDataSourceMySQLi.class.php"><a href="files/usersdatasourcemysqli-class.html"><abbr title="UsersDataSourceMySQLi.class.php">UsersDataSourceMySQLi.class.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">114</span>
</aside>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">protected</span>
<span class="phpdocumentor-signature__type"><abbr title="\mysqli">mysqli</abbr></span>
<span class="phpdocumentor-signature__name">$dbConnection</span>
= <span class="phpdocumentor-signature__default-value">alse</span></code>
<section class="phpdocumentor-description"><p>Holds the mysqli database connection</p>
</section>
</article>
</section>
<section class="phpdocumentor-methods">
<h3 class="phpdocumentor-elements__header" id="methods">
Methods
<a href="classes/usersDataSourceMySQLi.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___construct">
__construct()
<a href="classes/usersDataSourceMySQLi.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="UsersDataSourceMySQLi.class.php"><a href="files/usersdatasourcemysqli-class.html"><abbr title="UsersDataSourceMySQLi.class.php">UsersDataSourceMySQLi.class.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">131</span>
</aside>
<p class="phpdocumentor-summary">constructor for an instance of the class</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">__construct</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$connection</span&
gt;</span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$customFields</span><span> = "#A020F0"></span>
<span class="phpdocumentor-signature__argument__default-value">array()</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">null</span></code>
<section class="phpdocumentor-description"><p>If $dbConnection is not null, will be used for database access
If $dbLoginInfo is not null, will override $dbConnection, make
a new connection and use that.</p>
<p>If $dbDef is set, will be merged with $configuration</p>
</section>
<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">$connection</span>
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"></section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$customFields</span>
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
= <span class="phpdocumentor-signature__argument__default-value">array()</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"></section>
</dd>
</dl>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">null</span>
—
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_buildTable">
buildTable()
<a href="classes/usersDataSourceMySQLi.html#method_buildTable" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="UsersDataSourceMySQLi.class.php"><a href="files/usersdatasourcemysqli-class.html"><abbr title="UsersDataSourceMySQLi.class.php">UsersDataSourceMySQLi.class.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">273</span>
</aside>
<p class="phpdocumentor-summary">Convenience function to create the tables defined in $configuration</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">buildTable</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
<section class="phpdocumentor-description"><p>Using $configuration, build the table (replacing the current one)
then add $username with $password, setting as admin</p>
</section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">mixed</span>
—
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_getAllUsers">
getAllUsers()
<a href="classes/usersDataSourceMySQLi.html#method_getAllUsers" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="UsersDataSourceMySQLi.class.php"><a href="files/usersdatasourcemysqli-class.html"><abbr title="UsersDataSourceMySQLi.class.php">UsersDataSourceMySQLi.class.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">420</span>
</aside>
<p class="phpdocumentor-summary">retrieves all users from the database</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">getAllUsers</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array<string|int, string></span></code>
<section class="phpdocumentor-description"><p>Retrieves all data for all users from table</p>
</section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">array<string|int, string></span>
—
<section class="phpdocumentor-description"><p>array of array of rows/columns</p>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_getARecord">
getARecord()
<a href="classes/usersDataSourceMySQLi.html#method_getARecord" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="UsersDataSourceMySQLi.class.php"><a href="files/usersdatasourcemysqli-class.html"><abbr title="UsersDataSourceMySQLi.class.php">UsersDataSourceMySQLi.class.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">215</span>
</aside>
<p class="phpdocumentor-summary">Get a record from the database</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">getARecord</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array<string|int, string> </span><span class="phpdocumentor-signature__argument__na
me">$whereFields</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">array<string|int, string> </span><span class="phpdocumento
r-signature__argument__name">$fieldList</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">arrayOR="#A020F0"><
string|int, string></span></code>
<section class="phpdocumentor-description"><p>Gets a single record from the database which matches $field containing
$username. If more than one record is returned, will return the first
one</p>
</section>
<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">$whereFields</span>
: <span class="phpdocumentor-signature__argument__return-type">array<string|int, string></span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>column=>value pairs for where clause</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$fieldList</span>
: <span class="phpdocumentor-signature__argument__return-type">array<string|int, string></span>
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>a list of columns to return. If empty, returns all columns</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">array<string|int, string></span>
—
<section class="phpdocumentor-description"><p>a hash containing fieldname=>value pairs from fetch_assoc</p>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_getPassword">
getPassword()
<a href="classes/usersDataSourceMySQLi.html#method_getPassword" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="UsersDataSourceMySQLi.class.php"><a href="files/usersdatasourcemysqli-class.html"><abbr title="UsersDataSourceMySQLi.class.php">UsersDataSourceMySQLi.class.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">234</span>
</aside>
<p class="phpdocumentor-summary">Retrieves the password field from table</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">getPassword</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$username</span&g
t;</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array<string|int, string></span></code>
<section class="phpdocumentor-description"><p>Note that the password is stored as a hash in the table</p>
</section>
<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">$username</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>username used to find record</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">array<string|int, string></span>
—
<section class="phpdocumentor-description"><p>an array of values key/value pairs</p>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_getUserID">
getUserID()
<a href="classes/usersDataSourceMySQLi.html#method_getUserID" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="UsersDataSourceMySQLi.class.php"><a href="files/usersdatasourcemysqli-class.html"><abbr title="UsersDataSourceMySQLi.class.php">UsersDataSourceMySQLi.class.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">244</span>
</aside>
<p class="phpdocumentor-summary">retrieves the userID from the table</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">getUserID</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$username</span>
</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
<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">$username</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
</dd>
</dl>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">int</span>
—
<section class="phpdocumentor-description"><p>user id</p>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_initTables">
initTables()
<a href="classes/usersDataSourceMySQLi.html#method_initTables" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="UsersDataSourceMySQLi.class.php"><a href="files/usersdatasourcemysqli-class.html"><abbr title="UsersDataSourceMySQLi.class.php">UsersDataSourceMySQLi.class.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">312</span>
</aside>
<p class="phpdocumentor-summary">Convenience function to initialize tables to values</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">initTables</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array<string|int, string> </span><span class="phpdocumentor-signature__argument__na
me">$initValues</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
<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">$initValues</span>
: <span class="phpdocumentor-signature__argument__return-type">array<string|int, string></span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Array of tablenames, column names and values</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">mixed</span>
—
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_test">
test()
<a href="classes/usersDataSourceMySQLi.html#method_test" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="UsersDataSourceMySQLi.class.php"><a href="files/usersdatasourcemysqli-class.html"><abbr title="UsersDataSourceMySQLi.class.php">UsersDataSourceMySQLi.class.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">366</span>
</aside>
<p class="phpdocumentor-summary">Tests that the database connection works and the table is built</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">test</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">bool</span>
—
<section class="phpdocumentor-description"><p>True if table exists (does not verify columns)</p>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_update">
update()
<a href="classes/usersDataSourceMySQLi.html#method_update" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="UsersDataSourceMySQLi.class.php"><a href="files/usersdatasourcemysqli-class.html"><abbr title="UsersDataSourceMySQLi.class.php">UsersDataSourceMySQLi.class.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">379</span>
</aside>
<p class="phpdocumentor-summary">updates row in database with $newData</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">update</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array<string|int, string> </span><span class="phpdocumentor-signature__argument__name&q
uot;>$newData</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><abbr title="\mysqli_result">mysqli_result</abbr>|bool</span></code>
<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">$newData</span>
: <span class="phpdocumentor-signature__argument__return-type">array<string|int, string></span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>fieldname/value pairs to be updated in table</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type"><abbr title="\mysqli_result">mysqli_result</abbr>|bool</span>
—
<section class="phpdocumentor-description"><p>The mysqli result from a query</p>
</section>
</article>
<article
class="phpdocumentor-element
-method
-protected
"
>
<h4 class="phpdocumentor-element__name" id="method_buildQuery">
buildQuery()
<a href="classes/usersDataSourceMySQLi.html#method_buildQuery" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="UsersDataSourceMySQLi.class.php"><a href="files/usersdatasourcemysqli-class.html"><abbr title="UsersDataSourceMySQLi.class.php">UsersDataSourceMySQLi.class.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">175</span>
</aside>
<p class="phpdocumentor-summary">Create a query to retrieve info from database</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">protected</span>
<span class="phpdocumentor-signature__name">buildQuery</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$whereFields</span&
gt;</span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">array<string|int, string> </span><span class="phpdocumentor-signature__argument__name">$fieldListOR="#A020F0"></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">string</span></code>
<section class="phpdocumentor-description"><p>Builds a query to retrieve records from the database. With all
parameters set to null, will retrieve all columns and records
Setting $field and $toFind create a where clause, and setting
$fieldList as a has (ie, 'fieldname' => 1) will limit the
fields returned</p>
</section>
<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">$whereFields</span>
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"></section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$fieldList</span>
: <span class="phpdocumentor-signature__argument__return-type">array<string|int, string></span>
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>a hash where the keys make a list of columns to return. If empty, returns all columns</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">string</span>
—
<section class="phpdocumentor-description"><p>A cleaned and formatted SQL Query</p>
</section>
</article>
<article
class="phpdocumentor-element
-method
-protected
"
>
<h4 class="phpdocumentor-element__name" id="method_doSQL">
doSQL()
<a href="classes/usersDataSourceMySQLi.html#method_doSQL" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="UsersDataSourceMySQLi.class.php"><a href="files/usersdatasourcemysqli-class.html"><abbr title="UsersDataSourceMySQLi.class.php">UsersDataSourceMySQLi.class.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">445</span>
</aside>
<p class="phpdocumentor-summary">Executes an SQL statement, returning the result</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">protected</span>
<span class="phpdocumentor-signature__name">doSQL</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$query</span><
/B></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$comment</span><span> = </s
pan><span class="phpdocumentor-signature__argument__default-value">''</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
<section class="phpdocumentor-description"><p>This simply runs mysqli::query, and returns the value of that</p>
<p>Created for testing and debugging, if the second parameter is
true, will NOT execute the query, but will instead display the
query passed.</p>
</section>
<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">$query</span>
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"></section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$comment</span>
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
= <span class="phpdocumentor-signature__argument__default-value">''</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"></section>
</dd>
</dl>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="#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">parameter</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<section class="phpdocumentor-description"><p>string $query SQL Query to execute</p>
</section>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">parameter</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<section class="phpdocumentor-description"><p>string $comment if not empty, writes comment and query to a file</p>
</section>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">returns</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<section class="phpdocumentor-description"><p>mysqli_result</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">mixed</span>
—
</article>
<article
class="phpdocumentor-element
-method
-protected
"
>
<h4 class="phpdocumentor-element__name" id="method_escapeString">
escapeString()
<a href="classes/usersDataSourceMySQLi.html#method_escapeString" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="UsersDataSourceMySQLi.class.php"><a href="files/usersdatasourcemysqli-class.html"><abbr title="UsersDataSourceMySQLi.class.php">UsersDataSourceMySQLi.class.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">151</span>
</aside>
<p class="phpdocumentor-summary">Make string safe for MySQL</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">protected</span>
<span class="phpdocumentor-signature__name">escapeString</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$string</span>
;</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
<section class="phpdocumentor-description"><p>If the string is completely numeric, returns it, otherwise
puts single quotes around it</p>
</section>
<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">$string</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>The string to be fixed</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">string</span>
—
<section class="phpdocumentor-description"><p>A copy of the string, ready for SQL</p>
</section>
</article>
<article
class="phpdocumentor-element
-method
-protected
"
>
<h4 class="phpdocumentor-element__name" id="method_getAField">
getAField()
<a href="classes/usersDataSourceMySQLi.html#method_getAField" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="UsersDataSourceMySQLi.class.php"><a href="files/usersdatasourcemysqli-class.html"><abbr title="UsersDataSourceMySQLi.class.php">UsersDataSourceMySQLi.class.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">471</span>
</aside>
<p class="phpdocumentor-summary">Gets a single field from a table</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">protected</span>
<span class="phpdocumentor-signature__name">getAField</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$tableName</span>
</span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$returnColumn</span></span><span class="phpdocumentor-signature__argument&qu
ot;><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$fieldName</span></span><span class="phpdocumentor-signature__argument"><span>, </span><
;span class="phpdocumentor-signature__argument__return-type">mixed </span><span class="phpdocumentor-signature__argument__name">$value</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
<section class="phpdocumentor-description"><p>Builds a query similar to
select $returnColumn from $tableName where $fieldName = $value
executes it, and returns the first column of the first
row returned, or null if it does not exist.</p>
</section>
<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">$tableName</span>
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"></section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$returnColumn</span>
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"></section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$fieldName</span>
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"></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"></section>
</dd>
</dl>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="#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">parameter</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<section class="phpdocumentor-description"><p>string $tableName Name of database table</p>
</section>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">parameter</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<section class="phpdocumentor-description"><p>string $returnColumn Column to return</p>
</section>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">parameter</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<section class="phpdocumentor-description"><p>string $fieldName Name of column to search for value</p>
</section>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">parameter</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<section class="phpdocumentor-description"><p>string $value The value to match</p>
</section>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">returns</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<section class="phpdocumentor-description"><p>string $returnColumn of first row, or null if none</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">mixed</span>
—
</article>
<article
class="phpdocumentor-element
-method
-protected
"
>
<h4 class="phpdocumentor-element__name" id="method_setDBConnection">
setDBConnection()
<a href="classes/usersDataSourceMySQLi.html#method_setDBConnection" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="UsersDataSourceMySQLi.class.php"><a href="files/usersdatasourcemysqli-class.html"><abbr title="UsersDataSourceMySQLi.class.php">UsersDataSourceMySQLi.class.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">255</span>
</aside>
<p class="phpdocumentor-summary">Make the database connection</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">protected</span>
<span class="phpdocumentor-signature__name">setDBConnection</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array<string|int, string> </span><span class="phpdocumentor-signature__argumen
t__name">$parameters</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><abbr title="\mysqli">mysqli</abbr>|false</span></code>
<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">$parameters</span>
: <span class="phpdocumentor-signature__argument__return-type">array<string|int, string></span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Parameters for makeing the connection</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type"><abbr title="\mysqli">mysqli</abbr>|false</span>
—
</article>
<article
class="phpdocumentor-element
-method
-protected
"
>
<h4 class="phpdocumentor-element__name" id="method_tableColumnName">
tableColumnName()
<a href="classes/usersDataSourceMySQLi.html#method_tableColumnName" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="UsersDataSourceMySQLi.class.php"><a href="files/usersdatasourcemysqli-class.html"><abbr title="UsersDataSourceMySQLi.class.php">UsersDataSourceMySQLi.class.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">347</span>
</aside>
<p class="phpdocumentor-summary">Gets the actual database column name from the configuration file</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">protected</span>
<span class="phpdocumentor-signature__name">tableColumnName</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$table</span&
gt;</span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$field</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">''</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type"ONT COLOR="#A020F0">>
bool </span><span class="phpdocumentor-signature__argument__name">$fullTableColumn</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">false</span><span> ]</span></span><span>)</span><span> : COLOR="#A020F0"></span>
<span class="phpdocumentor-signature__response_type">string</span></code>
<section class="phpdocumentor-description"><p>Since we use a lot of indirection, this is a handy function which
allows us to replace something like
$this->configuration['tables']['users']['fields']['name']['dbColumn']
with
$this->tableColumnName( 'users', 'name' )</p>
<p>If called with only one parameter (the table), will return the
actual database table name</p>
</section>
<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">$table</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Name of Table</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$field</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
= <span class="phpdocumentor-signature__argument__default-value">''</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Name of field in $table</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$fullTableColumn</span>
: <span class="phpdocumentor-signature__argument__return-type">bool</span>
= <span class="phpdocumentor-signature__argument__default-value">false</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>If set to true, will return table.column format</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">string</span>
—
<section class="phpdocumentor-description"><p>The actual name of the dbColumn in the table</p>
</section>
</article>
</section>
<script type="text/javascript">
function loadExternalCodeSnippets(line) {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach((pre) => {
var src = pre.getAttribute('data-src').replace( /\\/g, '/');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
var 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) {
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist, is empty or trying to view from localhost';
}
}
};
xhr.send(null);
});
}
var modals = document.querySelectorAll("[data-modal]");
modals.forEach(function (trigger) {
trigger.addEventListener("click", function (event) {
//event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippets(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 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>
</div>
<a href="classes/usersDataSourceMySQLi.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>
Generated by GNU Enscript 1.6.5.90.