File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed
Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 55namespace Laminas \Db \Adapter \Mysql \Container ;
66
77use Laminas \Db \Adapter \Driver \DriverInterface ;
8- use Laminas \Db \Adapter \Driver \ResultInterface ;
98use Laminas \Db \Adapter \Mysql \Adapter ;
109use Laminas \Db \Adapter \Platform \PlatformInterface ;
1110use Laminas \Db \Adapter \Profiler \ProfilerInterface ;
1211use Laminas \Db \Container \AdapterManager ;
12+ use Laminas \Db \ResultSet \ResultSetInterface ;
1313use Psr \Container \ContainerInterface ;
1414
1515final class AdapterFactory
@@ -21,7 +21,7 @@ public function __invoke(ContainerInterface $container): Adapter
2121 return new Adapter (
2222 $ adapterManager ->get (DriverInterface::class),
2323 $ adapterManager ->get (PlatformInterface::class),
24- $ adapterManager ->get (ResultInterface ::class),
24+ $ adapterManager ->get (ResultSetInterface ::class),
2525 $ adapterManager ->get (ProfilerInterface::class)
2626 );
2727 }
Original file line number Diff line number Diff line change 1111use Laminas \Db \Adapter \Platform \PlatformInterface ;
1212use Laminas \Db \Adapter \Profiler ;
1313use Laminas \Db \Container \AdapterManager ;
14+ use Laminas \Db \ResultSet \ResultSetInterface ;
1415use Laminas \ServiceManager \Factory \DelegatorFactoryInterface ;
1516use Laminas \ServiceManager \Factory \InvokableFactory ;
1617use Psr \Container \ContainerInterface ;
@@ -35,6 +36,7 @@ public function __invoke(
3536 PlatformInterface::class => PlatformInterfaceFactory::class,
3637 Profiler \Profiler::class => InvokableFactory::class,
3738 ResultInterface::class => ResultInterfaceFactory::class,
39+ ResultSetInterface::class => InvokableFactory::class,
3840 ],
3941 ]);
4042
Original file line number Diff line number Diff line change @@ -26,14 +26,19 @@ private function getConnection(AdapterManager $adapterManager): ConnectionInterf
2626 return new Driver \Mysqli \Connection ($ config );
2727 }
2828
29+ // todo: pull the ResultInterface from the adapter manager and pass it to the driver
2930 private function getDriver (AdapterManager $ adapterManager ): DriverInterface
3031 {
3132 $ config = $ adapterManager ->get ('db ' );
3233
3334 if ($ this ->isPdo ($ config ['driver ' ])) {
34- return new Driver \Pdo \Pdo ($ adapterManager ->get (ConnectionInterface::class));
35+ return new Driver \Pdo \Pdo (
36+ $ adapterManager ->get (ConnectionInterface::class)
37+ );
3538 }
36- return new Driver \Mysqli \Mysqli ($ adapterManager ->get (ConnectionInterface::class));
39+ return new Driver \Mysqli \Mysqli (
40+ $ adapterManager ->get (ConnectionInterface::class)
41+ );
3742 }
3843
3944 private function getResult (AdapterManager $ adapterManager ): ResultInterface
You can’t perform that action at this time.
0 commit comments