Skip to content

samlitowitz/php-radix-tree-generator

Repository files navigation

PHP Radix Tree Generator

Generate PHP code for a Radix Tree for a static set of data

Table of Contents

  1. Installation
  2. Usage
    1. Configuration

Installation

Install via Composer.

composer require --dev samlitowitz/php-radix-tree-generator

Usage

  1. Create a configuration targeting the type(s) you wish to generate a collection for.

  2. Generate the desired collection(s) by running the following command

    ./vendor/bin/php-radix-tree generate config.json ./path/to/output/dir/

Configuration

A JSON schema for the configuration is available here. The example RadixTree is generated using the example configuration. The RadixTreeUnderTest, generated for unit testing, is another good example of the generated PHP source code.


This site or product includes IP2Location™ ISO 3166-2 Subdivision Code which available from https://www.ip2location.com.

About

Generate PHP code for a Radix Tree for a static set of data

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages