fix typo in link
[mdref/mdref-pq] / pq / LOB / read.md
1 # string pq\LOB::read([int $length = 0x1000[, int &$read = NULL]])
2
3 Read a string of data from the current position of the *large object*.
4
5 ## Params:
6
7 * Optional int $length = 0x1000
8 The amount of bytes to read from the *large object*.
9 * Optional int &$read = NULL
10 The amount of bytes actually read from the *large object*.
11
12 ## Returns:
13
14 * string, the data read.
15
16 ## Throws:
17
18 * pq\Exception\InvalidArgumentException
19 * pq\Exception\BadMethodCallException
20 * pa\Exception\RuntimeException
21
22 ## Example:
23
24 <?php
25
26 $connection = new pq\Connection;
27 $transaction = new pq\Transaction($connection);
28
29 $data = $tansaction->openLOB(123)->read(100, $read);
30
31 printf("Read %d bytes: '%s'\n", $read, $data);
32
33 ?>