Download the PHP package fterenzani/lazypdo without Composer
On this page you can find all versions of the php package fterenzani/lazypdo. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download fterenzani/lazypdo
More information about fterenzani/lazypdo
Files in fterenzani/lazypdo
Download fterenzani/lazypdo
More information about fterenzani/lazypdo
Files in fterenzani/lazypdo
Vendor fterenzani
Package lazypdo
Short Description Just a bit of sugar in PDO
License LGPL
Homepage https://github.com/fterenzani/LazyPdo
Package lazypdo
Short Description Just a bit of sugar in PDO
License LGPL
Homepage https://github.com/fterenzani/LazyPdo
Please rate this library. Is it a good library?
Informations about the package lazypdo
// Lazy database connection
$lazyPdo = new \LazyPdo\Lazy('sqlite:::memory:');
// Normal connection
$notLazyPdo = new \LazyPdo\Pdo('sqlite:::memory:');
// It is the equivalent of
// $pdo = new PDO('sqlite:::memory:');
// $pdo->setAttribute(\PDO::ATTR_ERRMODE , \PDO::ERRMODE_EXCEPTION);
// $pdo->setAttribute(\PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_OBJ);
$lazyPdo instanceof \LazyPdo\LazyPdo; // true
$notLazyPdo instanceof \LazyPdo\LazyPdo; // true
$lazyPdo instanceof \PDO; // true
$notLazyPdo instanceof \PDO; // true
// Get the instance of \PDO
$pdo = $lazyPdo->getPdo();
// Shorthand method
$results = $lazyPdo->query($sql, array($vars, $to, $bind));
// It is the equivalent of:
// $stmt = $pdo->prepare($sql);
// $stmt->execute(array($vars, $to, $bind));
// $results = $stmt;
// Shorthand method
$affectedRows = $lazyPdo->exec($sql, array($vars, $to, $bind));
// It is the equivalent of:
// $stmt = $pdo->prepare($sql);
// $stmt->execute(array($vars, $to, $bind));
// $affectedRows = $stmt->rowCount();
$stmt = $lazyPdo->query($sql, array($vars, $to, $bind));
$stmt->fetchObjects('\My\CustomClass', array($constructor, $arguments));
// It is the equivalent of:
$stmt->fetchAll(\PDO::FETCH_CLASS, '\My\CustomClass', array($constructor, $arguments));
$stmt->fetchColumns(0);
// It is the equivalent of:
$stmt->fetchAll(\PDO::FETCH_COLUMN);All versions of lazypdo with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.4
The package fterenzani/lazypdo contains the following files
Loading the files please wait ...