1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-05 05:37:39 +02:00

improved coding style

This commit is contained in:
David Grudl
2015-06-19 03:11:36 +02:00
parent 462ef6934b
commit ca99b0b822
55 changed files with 297 additions and 306 deletions

View File

@@ -12,14 +12,13 @@ Tracy\Debugger::enable();
dibi::connect(array(
'driver' => 'sqlite3',
'driver' => 'sqlite3',
'database' => 'data/sample.s3db',
));
// using the "prototype" to add custom method to class DibiResult
DibiResult::extensionMethod('fetchShuffle', function(DibiResult $obj)
{
DibiResult::extensionMethod('fetchShuffle', function (DibiResult $obj) {
$all = $obj->fetchAll();
shuffle($all);
return $all;