daniel added a comment.

In https://phabricator.wikimedia.org/T118860#1813279, @adrianheine wrote:

> That looks to me like a fancier and less understandable way of just having an 
> `additionalData` hash on each data model object. Did I miss something?


That's pretty much it, yes.

> The Role Object Pattern doesn't help saying anything about the name of roles 
> or the type of role objects as far as I see it. Just as a hash, it stores 
> arbitrary things under arbitrary keys.


The names would be arbitrary, but it can be made type safe. My idea was to use 
getRoleObject( $name, $type = null ) to perform an optional check against $type.

In addition, the RoleManager doesn't have to be a hash. It could also 
instantiate objects on demand. With a plain hash, we would not have the freedom 
to do that.


TASK DETAIL
  https://phabricator.wikimedia.org/T118860

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: daniel
Cc: mkroetzsch, adrianheine, hoo, thiemowmde, aude, Jonas, JanZerebecki, 
JeroenDeDauw, Aklapper, StudiesWorld, daniel, Wikidata-bugs, Mbch331



_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to