kematjaya/export-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kematjaya/export-bundle

最新稳定版本:7.0

Composer 安装命令:

composer require kematjaya/export-bundle

包简介

help to export various format output

README 文档

README

export module to excel, pdf, or etc for symfony app If you install this component outside of a Symfony application, you can use kematjaya/export

  1. installation
composer require kematjaya/export-bundle
  1. add to config/bundles.php
...
Kematjaya\ExportBundle\ExportBundle::class => ['all' => true]
...
  1. using inside Controller
// src/Controller/TestController.php

...
use Kematjaya\Export\Processor\Excel\PHPSpreadsheetProcessor; // convert array to excel document
use Kematjaya\Export\Processor\Excel\HtmlToExcel;    // convert html to excel document
use Kematjaya\Export\Processor\PDF\DOMPDFProcessor; // convert html to PDF document
use Kematjaya\Export\Manager\ManagerInterface;
...

public function pdfDocument(ManagerInterface $exportManager)
{
    // html to pdf 
    $pdf = $exportManager->render('<h3>TEST</h3>', new DOMPDFProcessor('doc.pdf'));

    // html to excel
    $htmlToExcel = $manager->render('<table></table>', new HtmlToExcel('doc.xls'));
    
    // array to excel
    $data = [
        ['a', 'b', 'c']
    ];
    $arrayToExcel = $manager->render($data, new PHPSpreadsheetProcessor());
}
...

统计信息

  • 总下载量: 1.76k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-12-11