It's really not the most elegant solution I could think of, because we're talking about an event that could occur quite often and be difficult to come up with a decent strategy for dealing with constant model changes, observing filesystem changes that is. Here is my sort of brute force method for dealing with such a thing.
So we have a master list of constants (which underneath all have a value of course), and we have numerical values coming back from the filesystem that need to match up with one of the constants.
What do? Well, stringify the numeric values to create an associative array where the numeric values are the keys and the named constants are the values. This array is just a place holder of sorts and not meant to be modified, so make try to keep it as constant as possible. You can't declare an array as constant, but there are some hacks out there to do so. I'd also recommend making it static so that only one copy exists, and see if you can figure out a way to maximize seek times in the structure. That may be based on how much your filesystem changes and how many lookups you need to perform on the array, but you should be safe so long as PHP does a good job with its hash tables and keeps associative arrays at O(1) time.
NOTE: Just in case you run into memory issues with your keys being the way they are: The scoop on PHP array sizes