i want to apply the concepts described in this article and i wounder if fuel have something like this built-in and if not what is the best way to create these structs and where to but them?
lets share the knowledge and how eachone handles this bug factory :D
These things are basically Containers. The framework itself uses them as well, and will use them more and more. Like for example in the upcoming 1.6 the new File class used by the Upload package.
v2.0 will have a generic DataContainer class that you can use for this purpose, not only with getters and settings, but also with ArrayAccess and Iterator support.
They are classes like any other, so if you have a need for such classes, simply create them somewhere inside the classes folder, use the correct naming conventions, and use them.
It will not solve this issue, because they are variables as well, and are passed to the View the same way.
In the end, for Views the same rules apply as for all your other code: do not make mistakes.
Thanks for your reply,i am a big fan of you and fuelphp and my company started using fuel since the early beta :) mistakes just happens no matter how careful you get (specially when working in a big team) i wanted to minimize these errors by passing ONLY one instance of this container or value opject and by using only this object i cant access none existing values and if this happens i get hit by an exception instead of finding out later the hard way i will try to follow the article i mentioned before till V2 is ready :)
ps:anyone reading this feel free to comment with your opinion and suggestions,share the knowledge! Thanks and keep the good work