tourze/gb-t-4658

GB/T 4658 学历代码

0.0.2 2025-04-19 12:16 UTC

This package is auto-updated.

Last update: 2025-04-27 10:48:21 UTC


README

English | 中文

Latest Version Build Status Quality Score Total Downloads

A PHP 8.1+ enum implementation of GB/T 4658-2006 Codes for Record of Formal Schooling. Suitable for education institutions, HR management, information processing, and data exchange scenarios.

Features

  • Complete implementation of the GB/T 4658-2006 standard
  • Type-safe PHP 8.1+ enum
  • Provides labels, item arrays, and select options
  • Simple API, easy integration

Installation

  • Requires PHP 8.1 or above
  • Requires tourze/enum-extra package
composer require tourze/gb-t-4658

Quick Start

use Tourze\GBT4658\FormalSchooling;

// Get label
echo FormalSchooling::UNDERGRADUATE_GRADUATE->getLabel(); // "大学本科毕业"

// Get code value
echo FormalSchooling::UNDERGRADUATE_GRADUATE->value; // "21"

// Get all items
$items = FormalSchooling::items(); // Returns array of all items with labels

// Get select options
$options = FormalSchooling::select(); // Returns array of options for select element

Documentation

  • API Docs
  • All schooling codes and labels are available via the FormalSchooling enum
  • Supports extension for custom labels and options

Contributing

  • Issues and PRs are welcome
  • Follows PSR-12 code style
  • Please ensure all tests pass before submitting PRs

License

  • MIT License
  • Author: tourze

Changelog

See CHANGELOG