Download the PHP package quangtam/vietnam-address-converter without Composer

On this page you can find all versions of the php package quangtam/vietnam-address-converter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package vietnam-address-converter

Vietnam Address Converter PHP

Thư viện PHP để tự động chuyển đổi địa chỉ hành chính Việt Nam từ cũ sang mới theo Nghị quyết số 202/2025/QH15 của Quốc hội.

Packagist Version PHP Version

🌐 Multi-Language Support

Vietnam Address Converter hiện có sẵn cho nhiều ngôn ngữ lập trình:

💡 Tất cả implementations đều sử dụng cùng dữ liệu mapping và logic chuyển đổi để đảm bảo tính nhất quán.

✨ Tính năng chính

📈 Thay đổi quan trọng

Loại bỏ cấp Quận/Huyện

Theo Nghị quyết 202/2025/QH15, cấu trúc hành chính mới không còn cấp quận/huyện:

Trước (3 cấp):

Sau (2 cấp):

Ví dụ chuyển đổi:

Input:

Output:

🚀 Cài đặt

Yêu cầu hệ thống

Cài đặt qua Composer

Cài đặt thủ công

  1. Clone repository:

  2. Cài đặt dependencies:

🔧 Sử dụng cơ bản

1. Khởi tạo Converter

2. Chuyển đổi địa chỉ từ string

3. Chuyển đổi từ object

4. Xuất kết quả dưới dạng JSON

🔄 Các loại chuyển đổi

1. Merged (Gộp)

Nhiều phường/xã cũ được gộp thành một phường/xã mới:

2. Renamed (Đổi tên)

Phường/xã giữ nguyên ranh giới nhưng đổi tên:

3. Unchanged (Không đổi)

Phường/xã không có thay đổi:

📊 API Reference

VietnamAddressConverter

initialize(?string $dataPath = null): void

Khởi tạo converter với dữ liệu từ file JSON.

Tham số:

convertAddress(string|FullAddress $address): ConversionResult

Chuyển đổi địa chỉ từ định dạng cũ sang mới.

Tham số:

Kết quả trả về:

getDataStats(): array

Lấy thống kê dữ liệu.

getProvinces(): array

Lấy danh sách tất cả tỉnh/thành phố.

getWardsByProvince(string $provinceCode): array

Lấy danh sách phường/xã theo mã tỉnh.

searchMappings(string $keyword): array

Tìm kiếm mapping theo từ khóa.

Models

ConversionResult

FullAddress (Địa chỉ cũ có district)

NewAddress (Địa chỉ mới không có district)

💻 Ví dụ hoàn chỉnh

📊 Dữ liệu

Thư viện bao gồm:

Dữ liệu được cập nhật theo Nghị quyết số 202/2025/QH15 của Quốc hội về việc sắp xếp đơn vị hành chính.

🛠️ Phát triển

Chạy tests

Kiểm tra code style

Sửa code style

Chạy ví dụ

🤝 Đóng góp

Chúng tôi hoan nghênh mọi đóng góp! Vui lòng:

  1. Fork dự án
  2. Tạo feature branch (git checkout -b feature/amazing-feature)
  3. Commit thay đổi (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Mở Pull Request

📄 License

MIT License

📞 Liên hệ

🙏 Cảm ơn


Made with ❤️ for Vietnam developers


All versions of vietnam-address-converter with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
quangtam/vietnam-address-database Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package quangtam/vietnam-address-converter contains the following files

Loading the files please wait ....