1. Go to this page and download the library: Download annotation/enumeration 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/ */
annotation / enumeration example snippets
use Annotation\Enumeration\Attributes\Enumeration;
class User
{
use HasEnumeration;
#[Enumeration([
'WAIT' => '待审核',
'PASSED' => '成功',
'FAILED' => '失败',
])]
public function status()
{
//return $this->getAttributeEnumeration('status');
}
}