1 | <?php |
||
20 | class MongoBinData implements TypeInterface |
||
1 ignored issue
–
show
|
|||
21 | { |
||
22 | /** |
||
23 | * Generic binary data. |
||
24 | * @link http://php.net/manual/en/class.mongobindata.php#mongobindata.constants.custom |
||
25 | */ |
||
26 | const GENERIC = 0x0; |
||
27 | |||
28 | /** |
||
29 | * Function |
||
30 | * @link http://php.net/manual/en/class.mongobindata.php#mongobindata.constants.func |
||
31 | */ |
||
32 | const FUNC = 0x1; |
||
33 | |||
34 | /** |
||
35 | * Generic binary data (deprecated in favor of MongoBinData::GENERIC) |
||
36 | * @link http://php.net/manual/en/class.mongobindata.php#mongobindata.constants.byte-array |
||
37 | */ |
||
38 | const BYTE_ARRAY = 0x2; |
||
39 | |||
40 | /** |
||
41 | * Universally unique identifier (deprecated in favor of MongoBinData::UUID_RFC4122) |
||
42 | * @link http://php.net/manual/en/class.mongobindata.php#mongobindata.constants.uuid |
||
43 | */ |
||
44 | const UUID = 0x3; |
||
45 | |||
46 | /** |
||
47 | * Universally unique identifier (according to » RFC 4122) |
||
48 | * @link http://php.net/manual/en/class.mongobindata.php#mongobindata.constants.custom |
||
49 | */ |
||
50 | const UUID_RFC4122 = 0x4; |
||
51 | |||
52 | |||
53 | /** |
||
54 | * MD5 |
||
55 | * @link http://php.net/manual/en/class.mongobindata.php#mongobindata.constants.md5 |
||
56 | */ |
||
57 | const MD5 = 0x5; |
||
58 | |||
59 | /** |
||
60 | * User-defined type |
||
61 | * @link http://php.net/manual/en/class.mongobindata.php#mongobindata.constants.custom |
||
62 | */ |
||
63 | const CUSTOM = 0x80; |
||
64 | |||
65 | |||
66 | /** |
||
67 | * @link http://php.net/manual/en/class.mongobindata.php#mongobindata.props.bin |
||
68 | * @var $bin |
||
69 | */ |
||
70 | public $bin; |
||
71 | |||
72 | /** |
||
73 | * @link http://php.net/manual/en/class.mongobindata.php#mongobindata.props.type |
||
74 | * @var $type |
||
75 | */ |
||
76 | public $type; |
||
77 | |||
78 | /** |
||
79 | * Creates a new binary data object. |
||
80 | * |
||
81 | * @link http://php.net/manual/en/mongobindata.construct.php |
||
82 | * @param string $data Binary data |
||
83 | * @param int $type Data type |
||
84 | * @return MongoBinData Returns a new binary data object |
||
85 | */ |
||
86 | public function __construct($data, $type = 2) |
||
96 | |||
97 | /** |
||
98 | * Returns the string "<Mongo Binary Data>". To access the contents of a MongoBinData, use the bin field. |
||
99 | * |
||
100 | * @return string |
||
101 | */ |
||
102 | public function __toString() |
||
106 | |||
107 | /** |
||
108 | * Converts this MongoBinData to the new BSON Binary type |
||
109 | * |
||
110 | * @return Binary |
||
111 | * @internal This method is not part of the ext-mongo API |
||
112 | */ |
||
113 | public function toBSONType() |
||
117 | } |
||
118 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.