Provides Connection and ConnectionLocator functionality.
Switch branches/tags
Clone or download
pmjones Merge pull request #5 from n1215/fix_samplecode_error
fix a syntax error in example code
Latest commit 50bd809 Nov 20, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Merge pull request #5 from n1215/fix_samplecode_error Nov 20, 2018
src fix typehint Aug 8, 2018
tests update test Aug 8, 2018
.gitignore initial commit Mar 1, 2018 update for release 1.1.0 Aug 8, 2018 fix contributing file Apr 7, 2018 update meta docs Apr 7, 2018 add query logging note Aug 3, 2018
composer.json update meta files May 7, 2018
phpunit.php initial commit Mar 1, 2018
phpunit.xml.dist add 'name' attribute Aug 2, 2018


This package provides a Connection that decorates any PDO instance to provide the following:

  • A perform() method acts just like query(), but binds values to a prepared statement as part of the call.

  • Several fetch*() methods to return results in commonly-occurring situations.

  • Several yield*() methods as fetch*() equivalents to yield results instead of returning them.

  • Query logging, including backtraces to find where queries were issued.

  • The Connection always sets the PDO connection to ERRMODE_EXCEPTION mode for error reporting.

This package also provides a ConnectionLocator to register, instantiate, and retain named Connection objects for default, read (slave), and write (master) databases.

Read the documentation here.