2014-05-13 21:08:07 +02:00
|
|
|
<?php
|
|
|
|
abstract class AbstractMocker implements IMocker
|
|
|
|
{
|
|
|
|
public function mockMultiple($number = null)
|
|
|
|
{
|
2014-05-23 23:34:50 +02:00
|
|
|
return Core::getDatabase()->transaction(function() use ($number)
|
2014-05-13 21:08:07 +02:00
|
|
|
{
|
|
|
|
$ret = [];
|
|
|
|
foreach (range(1, $number) as $_)
|
|
|
|
{
|
|
|
|
$ret []= $this->mockSingle();
|
|
|
|
}
|
|
|
|
return $ret;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|