ItemManager Simplify Field Value Access

I have often seen that some people had issues with accessing the item field values:

That is particularly problematic if someone wants to access a complex field types like image- or file-upload.

However the accessing an item attribute is generally not a problem for most user:

The accessing item field values can be simplified with a Decorator class. Let's call it ItemSimplificator. The ItemSimplificator offers additional responsibilities to your Item object dynamically:

The ItemSimplificator class could be placed in the functions.php file in your theme directory, or you can create any file with this class and include it in your template.php file.

You can use the ItemSimplificator following way:

Now, accessing the item field values works exactly the same as when you access the item attributes:

The same also applies with complex fields (file upload, image upload), with the difference that there you'll need to access the object variable, which is an array. Here's an example: