Query/docs/classes/Query.Connection_Manager.html

286 lines
15 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html><html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<meta charset="utf-8">
<title>Query » \Query\Connection_Manager</title>
<meta name="author" content="Mike van Riel">
<meta name="description" content="">
<link href="../css/template.css" rel="stylesheet" media="all">
<script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script><script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script><script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script><script src="../js/bootstrap.js" type="text/javascript"></script><script src="../js/template.js" type="text/javascript"></script><script src="../js/prettify/prettify.min.js" type="text/javascript"></script><link rel="shortcut icon" href="../img/favicon.ico">
<link rel="apple-touch-icon" href="../img/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png">
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner"><div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></a><a class="brand" href="../index.html">Query</a><div class="nav-collapse"><ul class="nav">
<li class="dropdown">
<a href="#api" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b></a><ul class="dropdown-menu">
<li><a>Namespaces</a></li>
<li><a href="../namespaces/Query.html"><i class="icon-th"></i> Query</a></li>
<li><a href="../namespaces/global.html"><i class="icon-th"></i> global</a></li>
<li><a>Packages</a></li>
<li><a href="../packages/Query.html"><i class="icon-folder-open"></i> Query</a></li>
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b></a><ul class="dropdown-menu"><li><a href="../graph_class.html"><i class="icon-list-alt"></i> Class hierarchy diagram</a></li></ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b></a><ul class="dropdown-menu">
<li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors 
<span class="label label-info">0</span></a></li>
<li><a href="../markers.html"><i class="icon-map-marker"></i> Markers 
<ul></ul></a></li>
<li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements 
<span class="label label-info">2</span></a></li>
</ul>
</li>
</ul></div>
</div></div>
<div class="go_to_top"><a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a></div>
</div>
<div id="___" class="container">
<noscript><div class="alert alert-warning">
Javascript is disabled; several features are only available
if Javascript is enabled.
</div></noscript>
<div class="row">
<div class="span4">
<div class="btn-toolbar">
<div class="btn-group visibility" data-toggle="buttons-checkbox">
<button class="btn public active" title="Show public elements">Public</button><button class="btn protected" title="Show protected elements">Protected</button><button class="btn private" title="Show private elements">Private</button><button class="btn inherited active" title="Show inherited elements">Inherited</button>
</div>
<div class="btn-group view pull-right" data-toggle="buttons-radio">
<button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button><button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
</div>
</div>
<ul class="side-nav nav nav-list">
<li class="nav-header">
<i title="Methods" class="icon-custom icon-method"></i> Methods
<ul>
<li class="method public "><a href="#method_connect" title="connect() :: Parse the passed parameters and return a connection"><span class="description">Parse the passed parameters and return a connection</span><pre>connect()</pre></a></li>
<li class="method public "><a href="#method_get_connection" title="get_connection() :: Returns the connection specified by the name given"><span class="description">Returns the connection specified by the name given</span><pre>get_connection()</pre></a></li>
<li class="method public "><a href="#method_get_instance" title="get_instance() :: Return a connection manager instance"><span class="description">Return a connection manager instance</span><pre>get_instance()</pre></a></li>
</ul>
</li>
<li class="nav-header private">» Private
<ul>
<li class="method private "><a href="#method___clone" title="__clone() :: Private clone method to prevent cloning"><span class="description">Private clone method to prevent cloning</span><pre>__clone()</pre></a></li>
<li class="method private "><a href="#method___construct" title="__construct() :: Private constructor to prevent multiple instances"><span class="description">Private constructor to prevent multiple instances</span><pre>__construct()</pre></a></li>
<li class="method private "><a href="#method___wakeup" title="__wakeup() :: Make sure serialize/deseriaze doesn't work"><span class="description">Make sure serialize/deseriaze doesn't work</span><pre>__wakeup()</pre></a></li>
<li class="method private "><a href="#method_create_dsn" title="create_dsn() :: Create the dsn from the db type and params"><span class="description">Create the dsn from the db type and params</span><pre>create_dsn()</pre></a></li>
<li class="method private "><a href="#method_parse_params" title="parse_params() :: Parses params into a dsn and option array"><span class="description">Parses params into a dsn and option array</span><pre>parse_params()</pre></a></li>
</ul>
</li>
<li class="nav-header">
<i title="Properties" class="icon-custom icon-property"></i> Properties
<ul></ul>
</li>
<li class="nav-header private">» Private
<ul>
<li class="property private "><a href="#property_connections" title="$connections() :: Map of named database connections"><span class="description"></span><pre>$connections</pre></a></li>
<li class="property private "><a href="#property_instance" title="$instance() :: Class instance variable"><span class="description"></span><pre>$instance</pre></a></li>
</ul>
</li>
</ul>
</div>
<div class="span8">
<a id="\Query\Connection_Manager"></a><ul class="breadcrumb">
<li>
<a href="../index.html"><i title="Classes" class="icon-custom icon-class"></i></a><span class="divider">\</span>
</li>
<li><a href="../namespaces/Query.html">Query</a></li>
<li class="active">
<span class="divider">\</span><a href="../classes/Query.Connection_Manager.html">Connection_Manager</a>
</li>
</ul>
<div class="element class">
<p class="short_description">Connection manager class to manage connections for the
Query method</p>
<div class="details">
<div class="long_description"></div>
<table class="table table-bordered">
<tr>
<th>package</th>
<td><a href="../packages/Query.Core.html">Query</a></td>
</tr>
<tr>
<th>subpackage</th>
<td>Core</td>
</tr>
</table>
<h3>
<i title="Methods" class="icon-custom icon-method"></i> Methods</h3>
<a id="method_connect"></a><div class="element clickable method public method_connect" data-toggle="collapse" data-target=".method_connect .collapse" title="public">
<h2>Parse the passed parameters and return a connection</h2>
<pre>connect(\ArrayObject $params) : <a href="../classes/Query.Query_Builder.html">\Query\Query_Builder</a></pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$params</h4>
<code><a href="ArrayObject.html">\ArrayObject</a></code>
</div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="BadConnectionException.html">\Query\BadConnectionException</a></code></th>
<td></td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response"><code><a href="../classes/Query.Query_Builder.html">\Query\Query_Builder</a></code></div>
</div></div>
</div>
<a id="method_get_connection"></a><div class="element clickable method public method_get_connection" data-toggle="collapse" data-target=".method_get_connection .collapse" title="public">
<h2>Returns the connection specified by the name given</h2>
<pre>get_connection(string|array|object $name<code> = ''</code>) : <a href="../classes/Query.Query_Builder.html">\Query\Query_Builder</a></pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$name</h4>
<code>string</code><code>array</code><code>object</code>
</div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="InvalidArgumentException.html">\Query\InvalidArgumentException</a></code></th>
<td></td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response"><code><a href="../classes/Query.Query_Builder.html">\Query\Query_Builder</a></code></div>
</div></div>
</div>
<a id="method_get_instance"></a><div class="element clickable method public method_get_instance" data-toggle="collapse" data-target=".method_get_instance .collapse" title="public">
<h2>Return a connection manager instance</h2>
<pre>get_instance() : <a href="../classes/Query.Connection_Manager.html">\Query\Connection_Manager</a></pre>
<div class="labels"><span class="label">Static</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>staticvar</th>
<td>null $instance</td>
</tr></table>
<h3>Returns</h3>
<div class="subelement response"><code><a href="../classes/Query.Connection_Manager.html">\Query\Connection_Manager</a></code></div>
</div></div>
</div>
<a id="method___clone"></a><div class="element clickable method private method___clone" data-toggle="collapse" data-target=".method___clone .collapse" title="private">
<h2>Private clone method to prevent cloning</h2>
<pre>__clone() </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>codeCoverageIgnore</th>
<td></td>
</tr></table>
</div></div>
</div>
<a id="method___construct"></a><div class="element clickable method private method___construct" data-toggle="collapse" data-target=".method___construct .collapse" title="private">
<h2>Private constructor to prevent multiple instances</h2>
<pre>__construct() </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>codeCoverageIgnore</th>
<td></td>
</tr></table>
</div></div>
</div>
<a id="method___wakeup"></a><div class="element clickable method private method___wakeup" data-toggle="collapse" data-target=".method___wakeup .collapse" title="private">
<h2>Make sure serialize/deseriaze doesn't work</h2>
<pre>__wakeup() </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>codeCoverageIgnore</th>
<td></td>
</tr></table>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="DomainException.html">\Query\DomainException</a></code></th>
<td></td>
</tr></table>
</div></div>
</div>
<a id="method_create_dsn"></a><div class="element clickable method private method_create_dsn" data-toggle="collapse" data-target=".method_create_dsn .collapse" title="private">
<h2>Create the dsn from the db type and params</h2>
<pre>create_dsn(string $dbtype, \ArrayObject $params) : string</pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$dbtype</h4>
<code>string</code>
</div>
<div class="subelement argument">
<h4>$params</h4>
<code><a href="ArrayObject.html">\ArrayObject</a></code>
</div>
<h3>Returns</h3>
<div class="subelement response"><code>string</code></div>
</div></div>
</div>
<a id="method_parse_params"></a><div class="element clickable method private method_parse_params" data-toggle="collapse" data-target=".method_parse_params .collapse" title="private">
<h2>Parses params into a dsn and option array</h2>
<pre>parse_params(\ArrayObject $params) </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$params</h4>
<code><a href="ArrayObject.html">\ArrayObject</a></code>
</div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="../classes/Query.BadDBDriverException.html">\Query\BadDBDriverException</a></code></th>
<td></td>
</tr></table>
</div></div>
</div>
<h3>
<i title="Properties" class="icon-custom icon-property"></i> Properties</h3>
<a id="property_connections"> </a><div class="element clickable property private property_connections" data-toggle="collapse" data-target=".property_connections .collapse" title="private">
<h2>Map of named database connections</h2>
<pre>$connections : array</pre>
<div class="row collapse"><div class="detail-description">
<h3>Default</h3>
<div class="subelement argument"><code>array()</code></div>
</div></div>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><div class="long_description"></div></div></div>
</div>
<a id="property_instance"> </a><div class="element clickable property private property_instance" data-toggle="collapse" data-target=".property_instance .collapse" title="private">
<h2>Class instance variable</h2>
<pre>$instance : <a href="../classes/Query.Connection_Manager.html">\Query\Connection_Manager</a></pre>
<div class="row collapse"><div class="detail-description">
<h3>Default</h3>
<div class="subelement argument"><code>null</code></div>
</div></div>
<div class="labels"><span class="label">Static</span></div>
<div class="row collapse"><div class="detail-description"><div class="long_description"></div></div></div>
</div>
</div>
</div>
</div>
</div>
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.2.0
</a> and<br>
generated on 2014-04-10T15:54:52-04:00.<br></footer></div>
</div>
</body>
</html>