Jump to: navigation, search

OpenStack-SDK-PHP/Design/Service-Models

< OpenStack-SDK-PHP
Revision as of 10:40, 8 April 2014 by Jamiehannaford (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Jamie's comments (Tuesday 8th April):

To achieve dynamic properties with models, we can use two methods:

  1. Have all models implement \ArrayAccess, allowing them to be treated as arrays. Users are already comfortable with the dynamic nature of arrays.
  2. Use magic methods. This is more unpredictable and often asks users to make a leap of faith (guessing methods) because the API isn't defined


My personal opinion is to use \ArrayAccess, since it's a standard and well-supported approach.