Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: f2c3949045
Fetching contributors…

Cannot retrieve contributors at this time

87 lines (73 sloc) 2.876 kb
parameters:
xls.phpexcel.class: PHPExcel
xls.stream_writer.class: n3b\Bundle\Util\HttpFoundation\StreamResponse\StreamWriterWrapper
xls.stream_response.class: n3b\Bundle\Util\HttpFoundation\StreamResponse\StreamResponse
xls.factory.class: "PHPExcel_IOFactory"
xls.factory5.method: "PHPExcel_Writer_Excel5"
xls.factory2007.method: "PHPExcel_Writer_Excel2007"
xls.factoryPDF.method: "PHPExcel_Writer_PDF"
xls.factory.write_method: "save"
xls.service.class: Liuggio\ExcelBundle\Service\ExcelContainer
services:
xls.phpexcel:
class: %xls.phpexcel.class%
#factory for xls5
xls.factory_xls5:
class: %xls.factory5.method%
factory_class: %xls.factory.class%
factory_method: createWriter
arguments: [@xls.phpexcel, "Excel5"]
#factory for xls2007
xls.factory_xls2007:
class: %xls.factory2007.method%
factory_class: %xls.factory.class%
factory_method: createWriter
arguments: [@xls.phpexcel, "Excel2007"]
#reader for xls5
xls.load_xls5:
class: %xls.factory5.method%
factory_class: %xls.factory.class%
factory_method: createReader
arguments: ["Excel5"]
#reader for xls2007
xls.load_xls2007:
class: %xls.factory2007.method%
factory_class: %xls.factory.class%
factory_method: createReader
arguments: ["Excel2007"]
#setter injection
xls.stream_writer_output_xls5:
class: %xls.stream_writer.class%
arguments: ["php://output"]
calls:
- [ setWriter, [ @xls.factory_xls5, %xls.factory.write_method% ] ]
xls.stream_writer_output_xls2007:
class: %xls.stream_writer.class%
arguments: ["php://output"]
calls:
- [ setWriter, [ @xls.factory_xls2007, %xls.factory.write_method% ] ]
#service to call
xls.service_xls5:
class: %xls.service.class%
arguments: [@xls.phpexcel, @xls.stream_writer_output_xls5, %xls.stream_response.class%]
#service to call for xls2007
xls.service_xls2007:
class: %xls.service.class%
arguments: [@xls.phpexcel, @xls.stream_writer_output_xls2007, %xls.stream_response.class%]
# if you need to create another PHP object
#factory for another format
xls.factory_pdf:
class: %xls.factoryPDF.method%
factory_class: %xls.factory.class%
factory_method: createWriter
arguments: [@xls.phpexcel, "PDF"]
#setter injection
xls.stream_writer_output_PDF:
class: %xls.stream_writer.class%
arguments: ["php://output"]
calls:
- [ setWriter, [ @xls.factory_pdf, %xls.factory.write_method% ] ]
#service to call
xls.service_pdf:
class: %xls.service.class%
arguments: [@xls.phpexcel, @xls.stream_writer_output_PDF, %xls.stream_response.class%]
Jump to Line
Something went wrong with that request. Please try again.