-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Horde_Db_Value_Text and updateBlob(). Fix insertBlob() returns. Fix Horde_Db_Adapter interface.
- Loading branch information
Showing
6 changed files
with
247 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
/** | ||
* Copyright 2014 Horde LLC (http://www.horde.org/) | ||
* | ||
* @author Jan Schneider <jan@horde.org> | ||
* @license http://www.horde.org/licenses/bsd | ||
* @category Horde | ||
* @package Db | ||
*/ | ||
|
||
/** | ||
* Encapsulation object for long text values to be used in SQL statements to | ||
* ensure proper quoting, escaping, retrieval, etc. | ||
* | ||
* @author Jan Schneider <jan@horde.org> | ||
* @license http://www.horde.org/licenses/bsd | ||
* @category Horde | ||
* @package Db | ||
*/ | ||
class Horde_Db_Value_Text implements Horde_Db_Value | ||
{ | ||
/** | ||
* Text value to be quoted | ||
* | ||
* @var string | ||
* @since Horde_Db 2.1.0 | ||
*/ | ||
public $value; | ||
|
||
/** | ||
* Constructor | ||
* | ||
* @param string $textValue | ||
*/ | ||
public function __construct($textValue) | ||
{ | ||
$this->value = $textValue; | ||
} | ||
|
||
/** | ||
* @param Horde_Db_Adapter $db | ||
*/ | ||
public function quote(Horde_Db_Adapter $db) | ||
{ | ||
return $db->quoteString($this->value); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters