finished!
[mdref/mdref-pq] / pq / Converter / convertFromString.md
1 # mixed pq\Converter::convertFromString(string $data[, int $type = NULL)
2
3 Convert a string received from the PostgreSQL server back to a PHP type.
4
5 ## Params:
6
7 * string $data
8 String data received from the server.
9 * Optional in $type = NULL
10 The type of the data. Irrelevant for single-type converters.
11
12 ## Returns:
13
14 * mixed, the value converted to a PHP type.
15
16 ## Example:
17
18 <?php
19
20 abstract class Example implements pq\Converter {
21 function convertFromString($data, $type = NULL) {
22 return uuid_parse($data);
23 }
24 }
25
26 ?>