1 # int pq\Transaction::importLOB(string $local_path[, int $oid = pq\LOB::INVALID_OID)
3 Import a local file into a *large object*.
8 A path to a local file to import.
9 * Optional int $oid = pq\LOB::INVALID_OID
10 The target OID. A new *large object* will be created if INVALID_OID.
14 * int, the (new) OID of the *large object*.
18 * pq\Exception\InvalidArgumentException
19 * pq\Exception\BadMethodCallException
20 * pq\Exception\RuntimeException
26 $connection = new pq\Connection;
27 $transaction = $connection->startTransaction();
29 $oid = $transaction->importLOB(__FILE__);
30 $lob = $transaction->openLOB($oid);
38 object(pq\LOB)#5 (3) {
45 resource(6) of type (stream)