Skip to content

Commit

Permalink
removed Zend\ServiceManager\Factory\InvokableFactory so ZfcDatagrid…
Browse files Browse the repository at this point in the history
… works with zend-mvc and zend-servicemanager 2.5
  • Loading branch information
kokspflanze committed Mar 14, 2016
1 parent af9b6a2 commit 49f23d3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"require": {
"php": "~5.5|~7.0",

"zendframework/zend-mvc": "~2.7",
"zendframework/zend-mvc": "~2.5",
"zendframework/zend-modulemanager": "~2.5",
"zendframework/zend-session": "~2.5",
"zendframework/zend-view": "~2.5",
Expand Down
29 changes: 21 additions & 8 deletions config/module.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
use ZfcDatagrid\Datagrid;
use ZfcDatagrid\Renderer;
use ZfcDatagrid\Service;
use Zend\ServiceManager\Factory\InvokableFactory;

return [
'ZfcDatagrid' => [
Expand Down Expand Up @@ -210,17 +209,31 @@
'zfcDatagrid_dbAdapter' => Service\ZendDbAdapterFactory::class,

// HTML renderer
Renderer\BootstrapTable\Renderer::class => InvokableFactory::class,
Renderer\JqGrid\Renderer::class => InvokableFactory::class,
Renderer\BootstrapTable\Renderer::class => function() {
return new Renderer\BootstrapTable\Renderer();
},
Renderer\JqGrid\Renderer::class => function() {
return new Renderer\JqGrid\Renderer();
},

// CLI renderer
Renderer\ZendTable\Renderer::class => InvokableFactory::class,
Renderer\ZendTable\Renderer::class => function() {
return new Renderer\ZendTable\Renderer();
},

// Export renderer
Renderer\PrintHtml\Renderer::class => InvokableFactory::class,
Renderer\PHPExcel\Renderer::class => InvokableFactory::class,
Renderer\TCPDF\Renderer::class => InvokableFactory::class,
Renderer\Csv\Renderer::class => InvokableFactory::class,
Renderer\PrintHtml\Renderer::class => function() {
return new Renderer\PrintHtml\Renderer();
},
Renderer\PHPExcel\Renderer::class => function() {
return new Renderer\PHPExcel\Renderer();
},
Renderer\TCPDF\Renderer::class => function() {
return new Renderer\TCPDF\Renderer();
},
Renderer\Csv\Renderer::class => function() {
return new Renderer\Csv\Renderer();
},
],

'aliases' => [
Expand Down

0 comments on commit 49f23d3

Please sign in to comment.