Commit with composer.json

This commit is contained in:
2014-05-27 17:56:46 +04:00
parent c62620593f
commit aec1a60985
20 changed files with 70 additions and 46 deletions

View File

@ -83,23 +83,23 @@ class MySQLiStatement extends DbStatement
* @return mixed
* @throws GeneralException
*/
public function fetch($style = Db::FETCH_OBJ)
public function fetch($style = \Majestic\Db::FETCH_OBJ)
{
if (!$this->result) {
return false;
}
switch ($style) {
case Db::FETCH_OBJ:
case \Majestic\Db::FETCH_OBJ:
$row = $this->result->fetch_object();
break;
case Db::FETCH_NUM:
case \Majestic\Db::FETCH_NUM:
$row = $this->result->fetch_array(MYSQLI_NUM);
break;
case Db::FETCH_ASSOC:
case \Majestic\Db::FETCH_ASSOC:
$row = $this->result->fetch_assoc();
break;
case Db::FETCH_BOTH:
case \Majestic\Db::FETCH_BOTH:
$row = $this->result->fetch_array(MYSQLI_BOTH);
break;
default:
@ -123,7 +123,7 @@ class MySQLiStatement extends DbStatement
public function fetchPairs()
{
$data = array();
while ($row = $this->fetch(Db::FETCH_NUM)) {
while ($row = $this->fetch(\Majestic\Db::FETCH_NUM)) {
$data[$row[0]] = $row[1];
}
return $data;