finished!
[mdref/mdref-pq] / pq / Converter / convertToString.md
1 # string pq\Converter::convertToString(mixed $value[, int $type = NULL])
2
3 Convert a value to a string for use in a query.
4
5 ## Params:
6
7 * mixed $value
8 The PHP value which should be converted to a string.
9 * Optional int $type = NULL
10 The type the converter should handle. Irrelevant for singly-type converters.
11
12 ## Returns:
13
14 * string, a textual represenation of the value accepted by the PostgreSQL server.
15
16 ## Example:
17
18 <?php
19
20 abstract class Example implements pq\Converter {
21 function convertToString($uuid, $type = NULL) {
22 return uuid_unparse($uuid);
23 }
24 }
25
26 ?>