eZ Community » Forums » eZ Publish 5 Platform » ezp\base\model class: a few questions
expandshrink

ezp\base\model class: a few questions

ezp\base\model class: a few questions

Saturday 15 October 2011 3:50:36 am - 3 replies

  • are dynamic properties supposed to be writeable or not? Using __set seems to indicate not, using fromHash indicates yes. Is this desirable?
  • also it seems that dynamic properties are supposed to be arrays or iterables. What if they can be string?
  • the toHash function should include a filter of the properties to retrieve and the max level of recursion to go to. Otherwise doing a tohash of a node becomes impossible as it currently is using the ezpo based classes

Saturday 15 October 2011 9:59:27 am

Hi Gaetano

Dynamic properties are to be refactored a bit. We finally decided to make them read-only and make people use set* methods directly instead, to avoid useless overhead. fromHash() is a method to be refactored as well when we'll decide to move forward on HTTP layer

Saturday 15 October 2011 11:39:15 am

what he said happy.gif Emoticon

Monday 17 October 2011 2:50:35 pm

  • are dynamic properties supposed to be writeable or not? Using __set seems to indicate not, using fromHash indicates yes. Is this desirable?
  • also it seems that dynamic properties are supposed to be arrays or iterables. What if they can be string?
  • the toHash function should include a filter of the properties to retrieve and the max level of recursion to go to. Otherwise doing a tohash of a node becomes impossible as it currently is using the ezpo based classes

#2 The main use case for dynamic properties are associations, so might be something we should rename.

#3 It will use the value in $dynamicProperties to indicate if association is member of the aggregate or not, so currently no need to add any filter as long as that is setup as it was intended.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from