Preparing for release.

This commit is contained in:
Andrew McMillan committed 2009-04-10 23:54:20 +12:00
1 parent b428d0a598
commit c482edb2fe
77 files changed
+3144 -580

No files matched your search

+575
View File
@@ -0,0 +1,575 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class PdoDatabase</title>
<link rel="stylesheet" href="../../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body"> ␍
<h2 class="class-name"><img src="../../media/images/Class_logo.png"
alt=" Class"
title=" Class"
style="vertical-align: middle"> PdoDatabase</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
| <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Typically there will only be a single instance of the database level class in an application.</p>
<p class="notes">
Located in <a class="field" href="_inc---PdoQuery.php.html">/inc/PdoQuery.php</a> (line <span class="field">218</span>)
</p>
<pre></pre>
</div>
</div>
<a name="sec-var-summary"></a>
<div class="info-box">
<div class="info-box-title">Variable Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
|
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="var-summary">
<div class="var-title">
<img src="../../media/images/Variable.png" alt=" " />
<span class="var-type">mixed</span>
<a href="#$querycount" title="details" class="var-name">$querycount</a>
</div>
<div class="var-title">
<img src="../../media/images/Variable.png" alt=" " />
<span class="var-type">mixed</span>
<a href="#$querytime" title="details" class="var-name">$querytime</a>
</div>
<div class="var-title">
<img src="../../media/images/Variable.png" alt=" " />
<span class="var-type">mixed</span>
<a href="#$txnstate" title="details" class="var-name">$txnstate</a>
</div>
</div>
</div>
</div>
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
<img src="../../media/images/Constructor.png" alt=" "/>
<span class="method-result">PdoDatabase</span>
<a href="#__construct" title="details" class="method-name">__construct</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$connection_string</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$dbuser</span> = <span class="var-default">null</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$dbpass</span> = <span class="var-default">null</span>], [<span class="var-type">array</span>&nbsp;<span class="var-name">$options</span> = <span class="var-default">null</span>])
</div>
<div class="method-definition">
<img src="../../media/images/Method.png" alt=" "/>
<span class="method-result">void</span>
<a href="#Begin" title="details" class="method-name">Begin</a>
()
</div>
<div class="method-definition">
<img src="../../media/images/Method.png" alt=" "/>
<span class="method-result">void</span>
<a href="#Commit" title="details" class="method-name">Commit</a>
()
</div>
<div class="method-definition">
<img src="../../media/images/Method.png" alt=" "/>
<span class="method-result">mixed</span>
<a href="#Exec" title="details" class="method-name">Exec</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$sql_query_string</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">1</span>)
</div>
<div class="method-definition">
<img src="../../media/images/Method.png" alt=" "/>
<span class="method-result">void</span>
<a href="#GetFields" title="details" class="method-name">GetFields</a>
(<span class="var-type"></span>&nbsp;<span class="var-name">$tablename_string</span>)
</div>
<div class="method-definition">
<img src="../../media/images/Method.png" alt=" "/>
<span class="method-result">void</span>
<a href="#Prepare" title="details" class="method-name">Prepare</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$sql_query_string</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">1</span>)
</div>
<div class="method-definition">
<img src="../../media/images/Method.png" alt=" "/>
<span class="method-result">void</span>
<a href="#PrepareTranslated" title="details" class="method-name">PrepareTranslated</a>
()
</div>
<div class="method-definition">
<img src="../../media/images/Method.png" alt=" "/>
<span class="method-result">void</span>
<a href="#Rollback" title="details" class="method-name">Rollback</a>
()
</div>
<div class="method-definition">
<img src="../../media/images/Method.png" alt=" "/>
<span class="method-result">void</span>
<a href="#TotalDuration" title="details" class="method-name">TotalDuration</a>
()
</div>
<div class="method-definition">
<img src="../../media/images/Method.png" alt=" "/>
<span class="method-result">void</span>
<a href="#TotalQueries" title="details" class="method-name">TotalQueries</a>
()
</div>
<div class="method-definition">
<img src="../../media/images/Method.png" alt=" "/>
<span class="method-result">void</span>
<a href="#TransactionState" title="details" class="method-name">TransactionState</a>
()
</div>
<div class="method-definition">
<img src="../../media/images/Method.png" alt=" "/>
<span class="method-result">void</span>
<a href="#TranslateAll" title="details" class="method-name">TranslateAll</a>
(<span class="var-type"></span>&nbsp;<span class="var-name">$onoff_boolean</span>)
</div>
</div>
</div>
</div>
<a name="sec-vars"></a>
<div class="info-box">
<div class="info-box-title">Variables</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
|
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<a name="var$querycount" id="$querycount"><!-- --></A>
<div class="evenrow">
<div class="var-header">
<img src="../../media/images/Variable.png" />
<span class="var-title">
<span class="var-type">mixed</span>
<span class="var-name">$querycount</span>
= <span class="var-default"> 0</span> (line <span class="line-number">241</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Holds the count of queries executed so far</p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
</div>
<a name="var$querytime" id="$querytime"><!-- --></A>
<div class="oddrow">
<div class="var-header">
<img src="../../media/images/Variable.png" />
<span class="var-title">
<span class="var-type">mixed</span>
<span class="var-name">$querytime</span>
= <span class="var-default"> 0</span> (line <span class="line-number">246</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Holds the total duration of queries executed so far</p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
</div>
<a name="var$txnstate" id="$txnstate"><!-- --></A>
<div class="evenrow">
<div class="var-header">
<img src="../../media/images/Variable.png" />
<span class="var-title">
<span class="var-type">mixed</span>
<span class="var-name">$txnstate</span>
= <span class="var-default"> 0</span> (line <span class="line-number">236</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Holds the state of the transaction 0 = not started, 1 = in progress, -1 = error pending rollback/commit</p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
</div>
␍
</div>
</div>
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<img src="../../media/images/Constructor.png" />
<span class="method-title">Constructor __construct</span> (line <span class="line-number">262</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The connection string is in the standard PDO format. The database won't actually be connected until the first database query is run against it.</p>
<p class="description"><p>The database object will also initialise and hold an PdoDialect object which will be used to provide database specific SQL for some queries, as well as translation hooks for instances where it is necessary to modify the SQL in transit to support additional databases.</p></p>
<div class="method-signature">
<span class="method-result">PdoDatabase</span>
<span class="method-name">
__construct
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$connection_string</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$dbuser</span> = <span class="var-default">null</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$dbpass</span> = <span class="var-default">null</span>], [<span class="var-type">array</span>&nbsp;<span class="var-name">$options</span> = <span class="var-default">null</span>])
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$connection_string</span><span class="var-description">: The PDO connection string, in all it's glory</span> </li>
<li>
<span class="var-type">string</span>
<span class="var-name">$dbuser</span><span class="var-description">: The database username to connect as</span> </li>
<li>
<span class="var-type">string</span>
<span class="var-name">$dbpass</span><span class="var-description">: The database password to connect with</span> </li>
<li>
<span class="var-type">array</span>
<span class="var-name">$options</span><span class="var-description">: An array of driver options</span> </li>
</ul>
</div>
<a name="methodBegin" id="Begin"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">Begin</span> (line <span class="line-number">303</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Begin a transaction.</p>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
Begin
</span>
()
</div>
</div>
<a name="methodCommit" id="Commit"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">Commit</span> (line <span class="line-number">317</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Complete a transaction.</p>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
Commit
</span>
()
</div>
</div>
<a name="methodExec" id="Exec"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">Exec</span> (line <span class="line-number">287</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Construct and execute an SQL statement from the sql_string, replacing the parameters into it.</p>
<ul class="tags">
<li><span class="field">return:</span> false on error or number of rows affected. Test failure with === false</li>
</ul>
<div class="method-signature">
<span class="method-result">mixed</span>
<span class="method-name">
Exec
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$sql_query_string</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">1</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$sql_query_string</span><span class="var-description">: The SQL string containing optional variable replacements</span> </li>
<li>
<span class="var-type">mixed</span>
<span class="var-name">1</span><span class="var-description">: ... Subsequent arguments are positionally replaced into the $sql_query_string</span> </li>
</ul>
</div>
<a name="methodGetFields" id="GetFields"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">GetFields</span> (line <span class="line-number">368</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns an associative array of field types, keyed by field name, for the requested named table. Internally this calls PdoDialect::GetFields to get the required SQL and then processes the query in the normal manner.</p>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
GetFields
</span>
(<span class="var-type"></span>&nbsp;<span class="var-name">$tablename_string</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type"></span>
<span class="var-name">$tablename_string</span> </li>
</ul>
</div>
<a name="methodPrepare" id="Prepare"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">Prepare</span> (line <span class="line-number">273</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns a PdoQuery object created using this database, the supplied SQL string, and any parameters given.</p>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
Prepare
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$sql_query_string</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">1</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$sql_query_string</span><span class="var-description">: The SQL string containing optional variable replacements</span> </li>
<li>
<span class="var-type">mixed</span>
<span class="var-name">1</span><span class="var-description">: ... Subsequent arguments are positionally replaced into the $sql_query_string</span> </li>
</ul>
</div>
<a name="methodPrepareTranslated" id="PrepareTranslated"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">PrepareTranslated</span> (line <span class="line-number">376</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Operates identically to PdoDatabase::Prepare, except that PdoDialect::Translate() will be called on the query before any processing.</p>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
PrepareTranslated
</span>
()
</div>
</div>
<a name="methodRollback" id="Rollback"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">Rollback</span> (line <span class="line-number">328</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Cancel a transaction in progress.</p>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
Rollback
</span>
()
</div>
</div>
<a name="methodTotalDuration" id="TotalDuration"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">TotalDuration</span> (line <span class="line-number">351</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the total duration of quries executed so far by this object instance.</p>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
TotalDuration
</span>
()
</div>
</div>
<a name="methodTotalQueries" id="TotalQueries"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">TotalQueries</span> (line <span class="line-number">359</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the total number of quries executed by this object instance.</p>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
TotalQueries
</span>
()
</div>
</div>
<a name="methodTransactionState" id="TransactionState"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">TransactionState</span> (line <span class="line-number">343</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the current state of a transaction, indicating if we have begun a transaction, whether the transaction has failed, or if we are not in a transaction.</p>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
TransactionState
</span>
()
</div>
</div>
<a name="methodTranslateAll" id="TranslateAll"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">TranslateAll</span> (line <span class="line-number">384</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Switches on or off the processing flag controlling whether subsequent calls to PdoDatabase::Prepare are translated as if PrepareTranslated() had been called.</p>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
TranslateAll
</span>
(<span class="var-type"></span>&nbsp;<span class="var-name">$onoff_boolean</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type"></span>
<span class="var-name">$onoff_boolean</span> </li>
</ul>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Fri, 10 Apr 2009 23:45:53 +1200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
</p>
</div></body>
</html>␍
+315
View File
@@ -0,0 +1,315 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class PdoDialect</title>
<link rel="stylesheet" href="../../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body"> ␍
<h2 class="class-name"><img src="../../media/images/Class_logo.png"
alt=" Class"
title=" Class"
style="vertical-align: middle"> PdoDialect</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
| <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The PdoDialect class handles</p>
<p class="notes">
Located in <a class="field" href="_inc---PdoQuery.php.html">/inc/PdoQuery.php</a> (line <span class="field">41</span>)
</p>
<pre></pre>
</div>
</div>
<a name="sec-var-summary"></a>
<div class="info-box">
<div class="info-box-title">Variable Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
|
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="var-summary">
<div class="var-title">
<img src="../../media/images/Variable.png" alt=" " />
<span class="var-type">mixed</span>
<a href="#$dialect" title="details" class="var-name">$dialect</a>
</div>
</div>
</div>
</div>
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
<img src="../../media/images/Constructor.png" alt=" "/>
<span class="method-result">PdoDialect</span>
<a href="#__construct" title="details" class="method-name">__construct</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$connection_string</span>)
</div>
<div class="method-definition">
<img src="../../media/images/Method.png" alt=" "/>
<span class="method-result">void</span>
<a href="#GetFields" title="details" class="method-name">GetFields</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$tablename_string</span>)
</div>
<div class="method-definition">
<img src="../../media/images/Method.png" alt=" "/>
<span class="method-result">void</span>
<a href="#Quote" title="details" class="method-name">Quote</a>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$value</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$value_type</span> = <span class="var-default">null</span>])
</div>
<div class="method-definition">
<img src="../../media/images/Method.png" alt=" "/>
<span class="method-result">The</span>
<a href="#ReplaceParameters" title="details" class="method-name">ReplaceParameters</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">0</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">1</span>)
</div>
<div class="method-definition">
<img src="../../media/images/Method.png" alt=" "/>
<span class="method-result">void</span>
<a href="#Translate" title="details" class="method-name">Translate</a>
(<span class="var-type"></span>&nbsp;<span class="var-name">$sql_string</span>)
</div>
</div>
</div>
</div>
<a name="sec-vars"></a>
<div class="info-box">
<div class="info-box-title">Variables</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
|
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<a name="var$dialect" id="$dialect"><!-- --></A>
<div class="oddrow">
<div class="var-header">
<img src="../../media/images/Variable.png" />
<span class="var-title">
<span class="var-type">mixed</span>
<span class="var-name">$dialect</span>
(line <span class="line-number">49</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Holds the name of the database dialect</p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
</div>
␍
</div>
</div>
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<img src="../../media/images/Constructor.png" />
<span class="method-title">Constructor __construct</span> (line <span class="line-number">60</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Parses the connection string to ascertain the database dialect. Returns true if the dialect is supported and fails if the dialect is not supported. All code to support any given database should be within in an external include.</p>
<div class="method-signature">
<span class="method-result">PdoDialect</span>
<span class="method-name">
__construct
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$connection_string</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$connection_string</span><span class="var-description">: The full PDO connection string</span> </li>
</ul>
</div>
<a name="methodGetFields" id="GetFields"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">GetFields</span> (line <span class="line-number">76</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the SQL for the current database dialect which will return a two-column resultset containing a list of fields and their associated data types.</p>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
GetFields
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$tablename_string</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$tablename_string</span><span class="var-description">: The name of the table we want fields from</span> </li>
</ul>
</div>
<a name="methodQuote" id="Quote"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">Quote</span> (line <span class="line-number">114</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns $value escaped in an appropriate way for this database dialect.</p>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
Quote
</span>
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$value</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$value_type</span> = <span class="var-default">null</span>])
</div>
<ul class="parameters">
<li>
<span class="var-type">mixed</span>
<span class="var-name">$value</span><span class="var-description">: The value to be escaped</span> </li>
<li>
<span class="var-type">string</span>
<span class="var-name">$value_type</span><span class="var-description">: The type of escaping desired. If blank this will be worked out from gettype($value). The special type of 'identifier' can also be used for escaping of SQL identifiers.</span> </li>
</ul>
</div>
<a name="methodReplaceParameters" id="ReplaceParameters"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">ReplaceParameters</span> (line <span class="line-number">167</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Replaces query parameters with appropriately escaped substitutions.</p>
<p class="description"><p>The function takes a variable number of arguments, the first is the SQL string, with replaceable '?' characters (a la DBI). The subsequent parameters being the values to replace into the SQL string.</p><p>The values passed to the routine are analyzed for type, and quoted if they appear to need quoting. This can go wrong for (e.g.) NULL or other special SQL values which are not straightforwardly identifiable as needing quoting (or not). In such cases the parameter can be forced to be inserted unquoted by passing it as &quot;array( 'plain' =&gt; $param )&quot;.</p></p>
<ul class="tags">
<li><span class="field">return:</span> built query string</li>
</ul>
<div class="method-signature">
<span class="method-result">The</span>
<span class="method-name">
ReplaceParameters
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">0</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">1</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">0</span><span class="var-description">: The query string with replacable '?' characters.</span> </li>
<li>
<span class="var-type">mixed</span>
<span class="var-name">1</span><span class="var-description">: The values to replace into the SQL string.</span> </li>
</ul>
</div>
<a name="methodTranslate" id="Translate"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">Translate</span> (line <span class="line-number">101</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Translates the given SQL string into a form that will hopefully work for this database dialect. This hook is expected to be used by developers to provide support for differences in database operation by translating the query string in an arbitrary way, such as through a file or database lookup.</p>
<p class="description"><p>The actual translation to other SQL dialects will usually be application-specific, so that any routines called by this will usually be external to this library, or will use resources external to this library.</p></p>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
Translate
</span>
(<span class="var-type"></span>&nbsp;<span class="var-name">$sql_string</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type"></span>
<span class="var-name">$sql_string</span> </li>
</ul>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Fri, 10 Apr 2009 23:45:53 +1200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
</p>
</div></body>
</html>␍
+309
View File
@@ -0,0 +1,309 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class PdoQuery</title>
<link rel="stylesheet" href="../../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body"> ␍
<h2 class="class-name"><img src="../../media/images/Class_logo.png"
alt=" Class"
title=" Class"
style="vertical-align: middle"> PdoQuery</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">A variable of this class is normally constructed through a call to PdoDatabase::Query or PdoDatabase::Prepare, associating it on construction with the database which is to be queried.</p>
<p class="notes">
Located in <a class="field" href="_inc---PdoQuery.php.html">/inc/PdoQuery.php</a> (line <span class="field">395</span>)
</p>
<pre></pre>
</div>
</div>
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
<img src="../../media/images/Constructor.png" alt=" "/>
<span class="method-result">PdoQuery</span>
<a href="#__construct" title="details" class="method-name">__construct</a>
(<span class="var-type"></span>&nbsp;<span class="var-name">$db</span>)
</div>
<div class="method-definition">
<img src="../../media/images/Method.png" alt=" "/>
<span class="method-result">void</span>
<a href="#Exec" title="details" class="method-name">Exec</a>
()
</div>
<div class="method-definition">
<img src="../../media/images/Method.png" alt=" "/>
<span class="method-result">void</span>
<a href="#Fetch" title="details" class="method-name">Fetch</a>
()
</div>
<div class="method-definition">
<img src="../../media/images/Method.png" alt=" "/>
<span class="method-result">void</span>
<a href="#FetchAll" title="details" class="method-name">FetchAll</a>
()
</div>
<div class="method-definition">
<img src="../../media/images/Method.png" alt=" "/>
<span class="method-result">void</span>
<a href="#FetchArray" title="details" class="method-name">FetchArray</a>
()
</div>
<div class="method-definition">
<img src="../../media/images/Method.png" alt=" "/>
<span class="method-result">void</span>
<a href="#MaxDuration" title="details" class="method-name">MaxDuration</a>
(<span class="var-type">double</span>&nbsp;<span class="var-name">$seconds</span>)
</div>
<div class="method-definition">
<img src="../../media/images/Method.png" alt=" "/>
<span class="method-result">void</span>
<a href="#Query" title="details" class="method-name">Query</a>
()
</div>
<div class="method-definition">
<img src="../../media/images/Method.png" alt=" "/>
<span class="method-result">void</span>
<a href="#Rows" title="details" class="method-name">Rows</a>
()
</div>
</div>
</div>
</div>
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<img src="../../media/images/Constructor.png" />
<span class="method-title">Constructor __construct</span> (line <span class="line-number">406</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Where $db is a PdoDatabase object. This constructs the PdoQuery. If there are further parameters they will be in turn, the sql, and any positional parameters to replace into that, and will be passed to $this-&gt;Query() before returning.</p>
<div class="method-signature">
<span class="method-result">PdoQuery</span>
<span class="method-name">
__construct
</span>
(<span class="var-type"></span>&nbsp;<span class="var-name">$db</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type"></span>
<span class="var-name">$db</span> </li>
</ul>
</div>
<a name="methodExec" id="Exec"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">Exec</span> (line <span class="line-number">433</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">If there are (some) positional parameters in the prepared query, now is the last chance to supply them...</p>
<p class="description"><p>before the query is executed. Returns true on success and false on error.</p></p>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
Exec
</span>
()
</div>
</div>
<a name="methodFetch" id="Fetch"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">Fetch</span> (line <span class="line-number">447</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Will fetch the next row from the query into an object with elements named for the fields in the result.</p>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
Fetch
</span>
()
</div>
</div>
<a name="methodFetchAll" id="FetchAll"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">FetchAll</span> (line <span class="line-number">464</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Will fetch all result rows from the query into an array of objects with elements named for the fields in the result.</p>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
FetchAll
</span>
()
</div>
</div>
<a name="methodFetchArray" id="FetchArray"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">FetchArray</span> (line <span class="line-number">456</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Will fetch the next row from the query into an array with numbered elements and with elements named for the fields in the result.</p>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
FetchArray
</span>
()
</div>
</div>
<a name="methodMaxDuration" id="MaxDuration"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">MaxDuration</span> (line <span class="line-number">481</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Used to set the maximum duration for this query before it will be logged as a slow query.</p>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
MaxDuration
</span>
(<span class="var-type">double</span>&nbsp;<span class="var-name">$seconds</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">double</span>
<span class="var-name">$seconds</span><span class="var-description">: The maximum duration for this statement before logging it as 'slow'</span> </li>
</ul>
</div>
<a name="methodQuery" id="Query"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">Query</span> (line <span class="line-number">419</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">If the sql is supplied then PDO::prepare will be called with that SQL to prepare the query, and if there are positional parameters then they will be replaced into the sql_string (with appropriate escaping) before the call to PDO::prepare. Query preparation time is counted towards total query execution time.</p>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
Query
</span>
()
</div>
</div>
<a name="methodRows" id="Rows"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">Rows</span> (line <span class="line-number">472</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">An accessor for the number of rows affected when the query was executed.</p>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
Rows
</span>
()
</div>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Fri, 10 Apr 2009 23:45:54 +1200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
</p>
</div></body>
</html>␍
@@ -0,0 +1,95 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs for page PdoQuery.php</title>
<link rel="stylesheet" href="../../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body"> ␍
<h2 class="file-name"><img src="../../media/images/Page_logo.png" alt="File" style="vertical-align: middle">/inc/PdoQuery.php</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-classes">Classes</a>
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">PDO query class and associated functions</p>
<p class="description"><p>This subpackage provides some functions that are useful around database activity and a PdoDialect, PdoDatabase and PdoQuery classes to simplify handling of database queries and provide some access for a limited ability to handle varying database dialects.</p><p>The class is intended to be a very lightweight wrapper with some features that have proved useful in developing and debugging web-based applications: <ul><li>All queries are timed, and an expected time can be provided.</li><li>Parameters replaced into the SQL will be escaped correctly in order to
minimise the chances of SQL injection errors.</li><li>Queries which fail, or which exceed their expected execution time, will
be logged for potential further analysis.</li><li>Debug logging of queries may be enabled globally, or restricted to
particular sets of queries.</li><li>Simple syntax for iterating through a result set.</li></ul> See http://wiki.davical.org/w/PdoQuery for design and usage information.</p><p>If not already connected, PdoQuery will attempt to connect to the database, successively applying connection parameters from the array in $c-&gt;pdo_connect.</p><p>We will die if the database is not currently connected and we fail to find a working connection.</p></p>
<ul class="tags">
<li><span class="field">author:</span> Andrew McMillan &lt;<a href="mailto:andrew@morphoss.com">andrew@morphoss.com</a>&gt;</li>
<li><span class="field">copyright:</span> Morphoss Ltd</li>
<li><span class="field">license:</span> <a href="http://gnu.org/copyleft/gpl.html">GNU GPL v3</a></li>
</ul>
</div>
</div>
<a name="sec-classes"></a>
<div class="info-box">
<div class="info-box-title">Classes</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Classes</span>
</div>
<div class="info-box-body">
<table cellpadding="2" cellspacing="0" class="class-table">
<tr>
<th class="class-table-header">Class</th>
<th class="class-table-header">Description</th>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top; white-space: nowrap">
<img src="../../media/images/Class.png"
alt=" class"
title=" class"/>
<a href="../../awl/PdoQuery/PdoDialect.html">PdoDialect</a>
</td>
<td>
The PdoDialect class handles
</td>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top; white-space: nowrap">
<img src="../../media/images/Class.png"
alt=" class"
title=" class"/>
<a href="../../awl/PdoQuery/PdoDatabase.html">PdoDatabase</a>
</td>
<td>
Typically there will only be a single instance of the database level class in an application.
</td>
</tr>
<tr>
<td style="padding-right: 2em; vertical-align: top; white-space: nowrap">
<img src="../../media/images/Class.png"
alt=" class"
title=" class"/>
<a href="../../awl/PdoQuery/PdoQuery.html">PdoQuery</a>
</td>
<td>
A variable of this class is normally constructed through a call to PdoDatabase::Query or PdoDatabase::Prepare, associating it on construction with the database which is to be queried.
</td>
</tr>
</table>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Fri, 10 Apr 2009 23:45:53 +1200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
</p>
</div></body>
</html>␍