The final commit personal address books branches before merging

This commit is contained in:
RainLoop Team 2013-12-07 01:50:19 +04:00
parent 43f094220c
commit 867dcc8f7e
44 changed files with 2163 additions and 1147 deletions

View file

@ -4,6 +4,11 @@ namespace RainLoop\Common;
abstract class PdoAbstract
{
/**
* @var \PDO
*/
protected $oPDO = null;
/**
* @var \MailSo\Log\Logger
*/
@ -35,8 +40,7 @@ abstract class PdoAbstract
*/
protected function getPdoAccessData()
{
$aResult = array('mysql', 'mysql:host=127.0.0.1;port=3306;dbname=rainloop', 'root', '');
return $aResult;
return array('', '', '', '');
}
/**
@ -46,10 +50,9 @@ abstract class PdoAbstract
*/
protected function getPDO()
{
static $aPdoCache = null;
if ($aPdoCache)
if ($this->oPDO)
{
return $aPdoCache;
return $this->oPDO;
}
if (!\class_exists('PDO'))
@ -57,7 +60,6 @@ abstract class PdoAbstract
throw new \Exception('Class PDO does not exist');
}
// TODO
$sType = $sDsn = $sDbLogin = $sDbPassword = '';
list($sType, $sDsn, $sDbLogin, $sDbPassword) = $this->getPdoAccessData();
$this->sDbType = $sType;
@ -83,7 +85,7 @@ abstract class PdoAbstract
if ($oPdo)
{
$aPdoCache = $oPdo;
$this->oPDO = $oPdo;
}
else
{