承接 blacksenator/fritzdbf 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

blacksenator/fritzdbf

Composer 安装命令:

composer require blacksenator/fritzdbf

包简介

A simple generator for dbase files using PHP

README 文档

README

The class provides functions to manipulate the address database FRITZ!Adr from AVM. FRITZ!Adr is an address and phonebook for the more or less legacy programs FRITZ!Fon, FRITZ!Data and FRITZ!Com. But still in use for FRITZ!fax (fax4box).

alt text

Sample image of record editing window in FRITZ!Adr (Copyright© by AVM)

The database is a dBASE III file, the default name is 'FritzAdr.dbf'.

There are three reasons for using this class:

  1. because of the difficulty of implementing the outdated extension for dBase (PECL) for current PHP releases and platforms.
  2. due to the fact that for the purposes that only just one file with a defined structure has to be written (no reading or manipulating data in records or whatever else is conceivable)
  3. lastly, because it allows to write the data to memory instead of a local stored file. So it is possible to create the file via ftp directly in the target directory.

The DB analysis of a few FritzAdr.dbf files has surprisingly shown two variants with 19 e.g. 21 fields. Ultimately the 21er version works for me (default).

Features

  • Does create a dBase file in memory instead of writing it directly to a file (unlike the outdated PECL version)
  • limited functionality: there is only one changing function: addRecord() beside of getDatabase() to receive the generated database! If you think more features are needed, fork this repo and feel free to contribute!

Requirements

Installation

You can install it through Composer:

"require": {
    "blacksenator/fritzdbf": "dev-master#1.0"
},

or

git clone https://github.com/blacksenator/fritzdbf.git

Usage

setting a new instance with the number of fields:

$fritzDbf = new fritzdbf(19);    // number of fields

appending a record:

$fritzDbf->addRecord(['NAME' => 'John', 'VORNAME' => 'Doe']);

receiving the data:

$fileData = $fritzDbf->getDatabase());

Samples

use blacksenator\fritzdbf\fritzdbf;

$newData = ['BEZCHNG' => 'Maria Mustermann',   // Feld 1
            'FIRMA'   => 'Bundesdruckerei',
            'NAME'    => 'Mustermann',
            'VORNAME' => 'Erika',
            'TELEFON' => '03025980'
    ];

$fritzDbf = new fritzdbf();         // using default value 21
$fritzDbf->addRecord($newData);
file_put_contents('FritzAdr.dbf', $fritzDbf->getDatabase());

or directly via ftp (the reason why I coded this)

use blacksenator\fritzdbf\fritzdbf;

$newData = ['BEZCHNG' => 'Max Mustermann',   // Feld 1
            'FIRMA'   => 'Bundesdruckerei',
            'NAME'    => 'Mustermann',
            'VORNAME' => 'Max',
            'TELEFON' => '03025980'
    ];

$ftp_conn = ftp_connect($ftpserver);
ftp_login($ftp_conn, $user, $password);
ftp_chdir($ftp_conn, $destination);
$memstream = fopen('php://memory', 'r+');

$fritzDbf = new fritzdbf();
$fritzDbf->addRecord($newData);

$memstream = $fritzDbf->getDatabase();
rewind($memstream);
ftp_fput($ftp_conn, 'FritzAdr.dbf',  $memstream, FTP_BINARY);

License

This script is released under MIT license.

Authors

Copyright© 2019 - 2021 Volker Püschel

blacksenator/fritzdbf 适用场景与选型建议

blacksenator/fritzdbf 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 508 次下载、GitHub Stars 达 1, 最近一次更新时间为 2019 年 04 月 22 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「dbase」 「fax」 「fritzbox」 「fax4box」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 blacksenator/fritzdbf 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 blacksenator/fritzdbf 我们能提供哪些服务?
定制开发 / 二次开发

基于 blacksenator/fritzdbf 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-04-22