getPdo() public method

public getPdo ( ) : PDO
return PDO
Exemplo n.º 1
0
 /**
  * @param $value
  *
  * @return string
  */
 protected function quote($value)
 {
     if (!isset($value)) {
         return "NULL";
     }
     if (is_array($value)) {
         // (a, b) IN ((1, 2), (3, 4))
         return "(" . implode(", ", array_map(array($this, 'quote'), $value)) . ")";
     }
     $value = $this->formatValue($value);
     if (is_float($value)) {
         return sprintf("%F", $value);
         // otherwise depends on setlocale()
     }
     if ($value === false) {
         return "0";
     }
     if (is_int($value) || $value instanceof FluentLiteral) {
         // number or SQL code - for example "NOW()"
         return (string) $value;
     }
     return $this->fpdo->getPdo()->quote($value);
 }
Exemplo n.º 2
0
 public function PDO()
 {
     return $this->db->getPdo();
 }