lbigroupp/dpegenerator 问题修复 & 功能扩展

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

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

lbigroupp/dpegenerator

Composer 安装命令:

composer require lbigroupp/dpegenerator

包简介

This package is use for generate French DPEG picture. This new DPEG is an evolution of ELAN law on 2021-07-01.

README 文档

README

DPE Generator is a library that allows you to quickly generate an image of the new DPE and GES. If you generate DPEG picture for Guadaloupe (GP), you must add GP value in construct.

Available on https://packagist.org/packages/lbigroupp/dpegenerator

list of available functions (and their type)

(boolean) setGenerateImage 
(string) setPathToWriteImage 
(string) setNameOfPicture 
(string) setPictureType 
(int) setDpeVal 
(int) setGesVal 
(int) setSuperficie 

List of available constants

It's constants allow you to define the type of image you want DPE or GES.

const DPE_TYPE;
const GES_TYPE;

Example for generate picture on your personal folder

$type = \LBIGroupDpeGenerator\DpeGenerator::DPE_TYPE; 
// OR $type = \LBIGroupDpeGenerator\DpeGenerator::GES_TYPE
$dpeVal = 29;
$gesVal = 2;
$superficie = 35;
$imgTarget = "YOUR_TARGET";
$pictureName = "YOUR_PICTURE_NAME";

if (file_exists($imgTarget . $pictureName . '.png')) {
    return $imgTarget . $pictureName . '.png';
}

$dpe = new \LBIGroupDpeGenerator\DpeGenerator();
$dpe->setDpeVal($dpeVal);
$dpe->setGesVal($gesVal);
$dpe->setSuperficie($superficie);
$dpe->setPictureType($type);
$dpe->setPathToWriteImage($imgTarget);
$dpe->setNameOfPicture($pictureName);
$dpe->setGenerateImage(true);

// return file location
echo $dpe->generatePicture();

Example for see picture direcly on your website

$type = \LBIGroupDpeGenerator\DpeGenerator::DPE_TYPE; 
// OR $type = \LBIGroupDpeGenerator\DpeGenerator::GES_TYPE
$dpeVal = 29;
$gesVal = 2;
$superficie = 35;

$dpe = new \LBIGroupDpeGenerator\DpeGenerator();
$dpe->setDpeVal($dpeVal);
$dpe->setGesVal($gesVal);
$dpe->setSuperficie($superficie);
$dpe->setPictureType($type);

// return file location
echo $dpe->generatePicture();

Release Notes

v1.0 / v1.1 / v1.1 : it's not a stable versions ;

1.2.1 : stable version for all PHP versions (5, 7 and 8) ;

2.0.1 : stable version ONLY for PHP >= 7.1 ;

2.1 : addition DPEG for Guadeloupe via iso code GP;

2.3 : addition Final consuption and PHP =>7.4;

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-09-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固