定制 addon/kodifikator 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

addon/kodifikator

Composer 安装命令:

composer require addon/kodifikator

包简介

Parser and importer for the Ukrainian Codifier of Administrative-Territorial Units

README 文档

README

Parser and importer for the Codifier of Administrative-Territorial Units and Territorial Communities of Ukraine.

This Symfony-based project automates the process of parsing, downloading, and importing the official Ukrainian
Кодифікатор адміністративно-територіальних одиниць та територій територіальних громад КАТОТТГ
into your application.

Source

Official government page:
🔗 mindev.gov.ua

License: CC BY 4.0

Features

  • Automatically parses the latest codifier release from the official site.
  • Downloads and stores XLSX, PDF, DOCX versions of the document.
  • Imports XLSX data into your database using Doctrine.
  • Batch processing for optimized performance with large datasets.
  • Symfony Console command and HTTP API endpoints available.

Requirements

PHP Extensions

  • php-gd
  • php-zip
  • php-xml
  • php-mbstring

Composer Dependencies

composer require guzzlehttp/guzzle
composer require symfony/dom-crawler symfony/css-selector
composer require phpoffice/phpspreadsheet

Installation

  1. Clone the repository
  2. Set the environment variable for storage:
# .env
KODIFIKATOR_PATH="var/kodifikator"
  1. Register services in config/services.yaml
services:
    # Automatically register Doctrine repositories
    Kodifikator\Repository\:
        resource: '../addon/kodifikator/src/Repository'
        tags: ['doctrine.repository_service']

    # Register services with parameters
    Kodifikator\Service\KodifikatorUploader:
        arguments:
            $storagePath: '%env(resolve:KODIFIKATOR_PATH)%'

    Kodifikator\Service\KodifikatorImport:
        arguments:
            $storagePath: '%env(resolve:KODIFIKATOR_PATH)%'

    Kodifikator\Domain\KodifikatorParser: ~

    Kodifikator\Service\KodifikatorManager: ~

    # Autowire other classes (e.g., Console, Controller, etc.)
    Kodifikator\:
        resource: '%kernel.project_dir%/vendor/addon/kodifikator/src/Repository'
        exclude:
            - '%kernel.project_dir%/vendor/addon/kodifikator/src/Entity'
            - '%kernel.project_dir%/vendor/addon/kodifikator/src/Repository'
  1. Register Doctrine mapping in config/packages/doctrine.yaml:
doctrine:
    orm:
        mappings:
            Kodifikator:
                is_bundle: false
                type: attribute
                dir:  '%kernel.project_dir%/vendor/addon/kodifikator/src/Entity'
                prefix: 'Kodifikator\Entity'
                alias: Kodifikator
php bin/console make:migration
  1. Ensure the storage directory exists and is writable:
sudo mkdir -p var/kodifikator
sudo chown www-data:www-data var/kodifikator

Install via Composer:

composer require addon/kodifikator

Usage

Run the full fetch and import process via Symfony Console:

php bin/console kodifikator:update

Or call via HTTP API (if exposed):

GET  /kodifikator/parse     # Get available document links
POST /kodifikator/update    # Run full fetch & import process

Optimization Notes

This project handles large XLSX datasets efficiently:

  • Batch inserts: Processes 300 rows at a time
  • Hash upsert: Prevents duplicates using computed hash key
  • Streaming: XLSX rows are processed with minimal memory

Supports large files with 10,000+ rows.

Structure

Component Description
KodifikatorParser Parses the official government page
KodifikatorUploader Downloads XLSX/PDF/DOCX files and stores metadata
KodifikatorImport Reads and imports XLSX content into the database
KodifikatorController Optional API interface for triggering actions
KodifikatorUpdateCommand Symfony Console command for full update

License

This project uses publicly available government data under the
Creative Commons Attribution 4.0 International License (CC BY 4.0).

addon/kodifikator 适用场景与选型建议

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

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: CC-BY-4.0
  • 更新时间: 2025-06-26