/** * Quote Trusted Value * * The ability to quote values without notices * * @param $value * @return mixed */ public function quoteTrustedValue($value) { if ($this->resource instanceof \mysqli) { return '\'' . $this->resource->real_escape_string($value) . '\''; } if ($this->resource instanceof \PDO) { return $this->resource->quote($value); } return '\'' . addcslashes($value, "\n\r\\'\"") . '\''; }
/** * Quote Trusted Value * * The ability to quote values without notices * * @param $value * @return mixed */ public function quoteTrustedValue($value) { if ($this->resource instanceof DriverInterface) { $this->resource = $this->resource->getConnection()->getResource(); } if ($this->resource instanceof \mysqli) { return '\'' . $this->resource->real_escape_string($value) . '\''; } if ($this->resource instanceof \PDO) { return $this->resource->quote($value); } return '\'' . addcslashes($value, "\n\r\\'\"") . '\''; }