PHP code example of qlantech / enum

1. Go to this page and download the library: Download qlantech/enum library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

qlantech / enum example snippets


use Qltech\AbstractEnum;
use Qltech\Enum;

/**
 * @Enum
 */
class OrderStatus extends AbstractEnum
{
    /**
     * @Name("未知")
     */
    const UNKNOWN = 0;

    /**
     * @Name("申请中")
     */
    const APPLY = 1;

    /**
     * @Name("已到账")
     */
    const ARRIVED = 2;

    /**
     * @Name("已兑换")
     */
    const EXCHANGED = 3;
}