genesisaplicaciones/genesis-php-tools
Composer 安装命令:
composer require genesisaplicaciones/genesis-php-tools
包简介
Some libraries and helper functions commonly used by the Genesis Aplicaciones developer team across different solutions.
README 文档
README
Some libraries and helper functions commonly used by the Genesis Aplicaciones developer team across different solutions.
Libraries included
SpreadSheetTemplate.php
Quicky generate a spreadsheet document based on a common template with minimun configuration, but allowing you to customize several parameters, like:
- owner_info
- logo
- logo_wide
- logo_square
- solution_name
- title
- subject
- category
- last_modified_by
- table_color
- color_title_bg
- color_title_font
- color_headers_bg
- color_table_border
- memory_limit
For the table data, you can pass the raw data array from a database query and especify excluded columns and edit the names by overwriting all or only renaming the ones needed. Also, when generating the file you cant force the download directly or you can return the bin file and do what you want whith it (like a base64_encode).
Examples
Minimal effort setup:
// this way you get the report with the same data you pass and force the download $template = new GenesisPhpTools\SpreadSheetTemplate(); // Initialice the class with the default configuration $template->generate_file( "usuarios", //the report name $datos_reporte, //report data true, // force the download of the file );
Advanced usage:
// this way you get the report with excluded and renamed columns, a logo, custom color and correct file metadata $doc_config = [ 'owner_info' => $this->session->razon_social, 'logo' => 'assets/panel/img/logo.png', 'solution_name' => 'TimbraXML', 'table_color' => 'FF0C77C2' ]; $columns_config = [ "excluded" => ['id_cuenta', 'id_usuario'] , "renamed" => [ "control_access" => "Acceso al portal", "panel_access" => "Nivel de acceso", "vista" => "Tipo de facturacion" ] ]; $template = new GenesisPhpTools\SpreadSheetTemplate($doc_config); // Initialice the class with the default configuration $my_file = $template->generate_file( "usuarios", //the report name $datos_reporte, //report data false, // don't force the download of the file, so you can manipulate it $columns_config, ); return_data(base64_encode($my_file)); // return the data like you want, in this case in base64 inside a json response
genesisaplicaciones/genesis-php-tools 适用场景与选型建议
genesisaplicaciones/genesis-php-tools 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 122 次下载、GitHub Stars 达 0, 最近一次更新时间为 2020 年 08 月 13 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「helpers」 「tools」 「libraries」 「reports」 「Toolbox」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 genesisaplicaciones/genesis-php-tools 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 genesisaplicaciones/genesis-php-tools 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 genesisaplicaciones/genesis-php-tools 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A set of useful PHP classes.
A Laravel package to retrieve data from Google Search Console
HTML and form generation
GHT D-Tools Bundle
Falsy helps you manage half-truths with PHP
Allow KoolReport to use twig template engine to render view
统计信息
- 总下载量: 122
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 26
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-08-13

