Skip to content

Clevis/utils-enum-constants

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

clevis/utils-enum-constants

Utility to get values of constants of given prefix.

Example usage:

class Foo
{
	const PREFIX_FOO = 'foo';
	const PREFIX_BAR = 'bar';
	const SOME_UNRELATED_CONSTANT = 'whatever';
}

var_export(Clevis\Utils\EnumConstants::getEnumValues('Foo', 'PREFIX_'));

Prints out:

array(
	'foo' => 'foo',
	'bar' => 'bar'
)

About

Utility to get values of constants of given prefix.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages