This smells funny, but I can't quite put my finger on why.  We have a bunch of functions that all follow the same pattern to the point that we're extracting some of the procedural code out into its own function to save space.  But _return_mime_type_or_complete_array() is really more of a syntactic macro than an internal API.  If we're going to do that, I'd rather go much further and have each of these API functions be a shim around the real procedure, eg:

```
static function get_photo_types_by_extension($extension=null) {
  return legal_file::_get_types_by_extension("photo_types_by_extension", self::$photo_types_by_extension, array(...));
}
```

And have that function do all the work.  But there's only two of these cases and my rule of thumb is to avoid refactoring to avoid duplication until we have 3 cases so that we have some diversity.  Excessive parameterization makes it hard to tell exactly what the function is doing and that's counterproductive when it comes to code comprehension.  I think for now I'd get rid of the _return_xxx functions and inline the logic again and not worry about the code duplication.