honeybee / trellis

Library for defining structured entities in php.
Mozilla Public License 2.0
8 stars 1 forks source link

toNative() vs toArray() #21

Open MrHash opened 8 years ago

MrHash commented 8 years ago

Currently both implementations seem to be very similar. In order to avoid confusion we should be clear on what to use as it seems toArray() is sufficient.

graste commented 8 years ago

They turned out to be in fact similiar now while they were not when we started it. I had a look at the current implementation and the usage in projects and I think we can get rid of one of the methods. While we're at it we might want to introduce a ArrayableInterface or something instead of extending the base Object? This has implication on the automatic setting of properties via constructors though and might be a bigger change. Object and Configurable have leaked into honeybee. Any ideas how to proceed?

MrHash commented 8 years ago

I guess we could get better test coverage first then implement such changes but in principle, I'm in.