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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user