Esempio n. 1
0
 /**
  * {@inheritDoc}
  */
 public function quoteValue($value)
 {
     if ($this->resource instanceof DriverInterface) {
         $this->resource = $this->resource->getConnection()->getResource();
     }
     if ($this->resource) {
         if ($this->resource instanceof PDO) {
             return $this->resource->quote($value);
         }
         if (get_resource_type($this->resource) == 'oci8 connection' || get_resource_type($this->resource) == 'oci8 persistent connection') {
             return "'" . addcslashes(str_replace("'", "''", $value), "\n\r\"") . "'";
         }
     }
     trigger_error('Attempting to quote a value in ' . __CLASS__ . ' without extension/driver support ' . 'can introduce security vulnerabilities in a production environment.');
     return "'" . addcslashes(str_replace("'", "''", $value), "\n\r\"") . "'";
 }