ReflectionEnum::getCase
返回指定的枚举条目
&reftitle.description;
public ReflectionEnumUnitCaseReflectionEnum::getCase
stringname
根据名称返回指定枚举条目的反射对象。
如果请求的条目未定义,将抛出 ReflectionException。
&reftitle.parameters;
name
要获取的条目名称。
&reftitle.returnvalues;
ReflectionEnumUnitCase 或 ReflectionEnumBackedCase
的实例,具体视情况而定。
&reftitle.examples;
ReflectionEnum::getCase 示例
getCase('Clubs');
var_dump($rCase->getValue());
?>
]]>
&example.outputs;
&reftitle.seealso;
枚举
ReflectionEnum::getCases
ReflectionEnum::hasCase
ReflectionEnum::isBacked