hi,
Hello Nüsseknacker,
dieser Thread wird für mich erst dann zuende sein, wenn mir jemand nachweist, warum ich die anonyme Funktion nebst "use" hier nicht einsetzen durfte!
Ich möchte keine "Alternativlösungen", sondern den Nachweis, dass meine Idee hier Schrott war!
"Which One to Use?
There is no correct answer to this question. I would argue that if the process of determining the permissions is quite dependent on the application module, then the object oriented approach is more appropriate. However, if you think that each application module should be able to provide an authentication function, and your AuthPlugin is just a skeleton providing the authentication functionality but without knowing anything about users and procedures, then you can go with the functional approach.
The functional approach makes your AuthPlugin very abstract and you can depend on it. However, if you plan to allow your AuthPlugin to do more and know more about users and your system, then it will became too concrete, and you don't want to depend on it. In that case choose the object oriented way and let the concrete AuthPlugin depend on the more abstract application modules"
Wie von United verlinkt: http://code.tutsplus.com/tutorials/functional-programming-in-php--net-35043
mfg
tami