PHP code example of rsmike / label
1. Go to this page and download the library: Download rsmike/label 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/ */
rsmike / label example snippets
/**
* An example label class.
*
* @method static string|array status($item = [])
* @method static string|array abbr($item = [])
*/
abstract class TestLabels extends rsmike\label\Label
{
const INACTIVE = 0;
const ACTIVE = 1;
const OTHER = 3;
protected static $status = [
self::ACTIVE => 'Active',
self::INACTIVE => 'Inactive',
self::OTHER => 'Other',
];
protected static $abbr = [
self::ACTIVE => 'A',
self::INACTIVE => 'I'
];
}