1: <?php
2: /**
3: * Copyright 2006-2012 Horde LLC (http://www.horde.org/)
4: *
5: * @author Chuck Hagenbuch <chuck@horde.org>
6: * @license http://www.horde.org/licenses/bsd
7: * @category Horde
8: * @package Db
9: */
10:
11: /**
12: * Encapsulation object for binary values to be used in SQL statements to ensure
13: * proper quoting, escaping, retrieval, etc.
14: *
15: * @author Chuck Hagenbuch <chuck@horde.org>
16: * @license http://www.horde.org/licenses/bsd
17: * @category Horde
18: * @package Db
19: */
20: class Horde_Db_Value_Binary implements Horde_Db_Value
21: {
22: /**
23: * Binary value to be quoted
24: * @var string
25: */
26: protected $_value;
27:
28: /**
29: * Constructor
30: *
31: * @param string $binaryValue
32: */
33: public function __construct($binaryValue)
34: {
35: $this->_value = $binaryValue;
36: }
37:
38: /**
39: * @param Horde_Db_Adapter $db
40: */
41: public function quote(Horde_Db_Adapter $db)
42: {
43: return $db->quoteBinary($this->_value);
44: }
45: }
46: