Skip to content
This repository has been archived by the owner on Jan 17, 2024. It is now read-only.

Commit

Permalink
Property and method visibility changed for better access
Browse files Browse the repository at this point in the history
  • Loading branch information
cvgellhorn committed Aug 28, 2014
1 parent 61f12eb commit a973306
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions OneDB.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ class OneDB
*
* @var OneDB
*/
private static $_instance = null;
protected static $_instance = null;

/**
* Collection of active database connections
*
* @var array of OneDB connections
*/
private static $_connections = array();
protected static $_connections = array();

/**
* PDO object
Expand Down Expand Up @@ -110,7 +110,7 @@ public static function getConnection($name = null, $config = array())
* @return OneDB
* @throws OneException
*/
private static function _create($config)
protected static function _create($config)
{
if (!empty($config)) {
return new self($config);
Expand All @@ -124,7 +124,7 @@ private static function _create($config)
*
* @throws OneException
*/
private function __construct($config)
protected function __construct($config)
{
try {
if (!extension_loaded('pdo_mysql')) {
Expand Down Expand Up @@ -157,7 +157,7 @@ private function __construct($config)
* @return array Matched connection configs
* @throws OneException
*/
private function _prepareConfig($config)
protected function _prepareConfig($config)
{
$config = array_merge($this->_config, $config);
foreach ($config as $key => $val) {
Expand Down Expand Up @@ -186,7 +186,7 @@ private function _prepareConfig($config)
* @param string $sql SQL statement
* @return OneDB
*/
private function _prepare($sql)
protected function _prepare($sql)
{
$this->_stmt = $this->_pdo->prepare($sql);
return $this;
Expand All @@ -198,7 +198,7 @@ private function _prepare($sql)
* @param array $where Where conditions
* @param string $query Query string
*/
private function _buildWhere(&$where, &$query)
protected function _buildWhere(&$where, &$query)
{
if (!empty($where)) {
$expr = array();
Expand All @@ -219,7 +219,7 @@ private function _buildWhere(&$where, &$query)
* @param array $data SQL query params
* @return OneDB
*/
private function _bindParams($data)
protected function _bindParams($data)
{
if ($this->_debugMode) $this->dump(print_r($data, true));

Expand All @@ -237,7 +237,7 @@ private function _bindParams($data)
* @return PDOStatement
* @throws OneException
*/
private function _execute()
protected function _execute()
{
try {
if ($this->_debugMode) $this->dump($this->_stmt->queryString);
Expand Down

0 comments on commit a973306

Please sign in to comment.