Comments (3)
The root for this problem is actually ZfcUser itself. The UserInterface
only defines the getter-functions. Therefore all modules working with ZfcUser can ONLY be sure that getter functions do exist. Setter-functions aren't even defined by the UserInterface
itself.
Furthermore relying on Setter functions to be chainable is not that great of a thing to do, ESPECIALLY, if there's no Interface defining it.
As long as you're OK with your solution that'd be fine. I have no problem adding this though, so hopefully I'll get around to do this soon (it's really just a 2 minute work) :P
from samuser.
shameless plug: http://ocramius.github.io/blog/fluent-interfaces-are-evil/
from samuser.
Thanks Sam, I went fine with my solution in that particular project but your points makes total sense to me. Didn't know much about Interfaces before but also with the help of the article by Ocramius I really understand now (thanks for that Ocramius, the author of scnSocialAuth should read it too..).
I won't use a fluent interface design for my entities from now on.
Thanks again for the lesson ;)
and sorry for the very late response btw..
from samuser.
Related Issues (3)
- Better documentation HOT 2
- object_manager setting HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from samuser.