Proper way to pass along many variables in an OOP design (PHP) -
How do I pass correctly the data referenced in this structure:
- main For example the index, but I would like to avoid it:
New Page Operational ('' Page-Builder) '' Top, 'How To Cook', $ Keywords, $ Details, $ Script, $ css);
The above control looks and sounds terrible. And that figure has so much data, which should not be passed!
The data needs to be supplied by many users to class, head, body and leg, but what is the best way to send it along with the data that some data should be hard-coded , While some have to be set on a database basis or in some cases should depend on the default settings.
Why does an object not display your parameter set? So you pass only one object, but there are your personal criteria in it. One advantage is that you can easily reapply the method to add / remove the data, but the method does not change invocations because they are still handling parameter objects.
A (contrived) example is in the following (in Java), because I'm not PHP-aware)
Comments
Post a Comment