Edit report at https://bugs.php.net/bug.php?id=47228&edit=1
ID: 47228
Comment by: metamarkers at gmail dot com
Reported by: logy at logy dot com dot br
Summary: New magic method like __call, but that is called
even if the method exists
Status: Open
Type: Feature/Change Request
Package: Class/Object related
Operating System: Linux 2.6.20
PHP Version: 5.2.8
Block user comment: N
Private report: N
New Comment:
Well, that's a problem with Magento. Not PHP. Magento has objectively terrible
design.
Make your methods protected. __call() will be invoked if they're protected or
private. If your system isn't flexible enough to allow that, and doesn't have
some sort of event hook system, you need to reassess why you're using it in the
first place.
Previous Comments:
------------------------------------------------------------------------
[2013-01-26 08:19:00] info at ericdorr dot de
Since 2009 and still no implementation. Where I have to apply as Developer to
fix that ?
------------------------------------------------------------------------
[2012-06-12 21:48:43] sebastien dot roux dot dev at gmail dot com
This problem can be solved in several ways when we can implements a design
pattern on existing code, but when we works on products like magento when can't
do anything, overiding classes ans methods is very strict and limited.
The only way is to implement a new magic method like '__call' but called only
if method exists.
------------------------------------------------------------------------
[2009-01-28 10:55:04] logy at logy dot com dot br
Description:
------------
Not exactly a bug but i didn't find another good place to post it.
I'd like to see a implemented magic method or something like that, with
funcionality of the __call method but that hooks before any method that really
EXISTS in the class. Something like that would be very util on implementations
such as security and any other control over a multiple class design.
I think PHP a wonderful language, but for the first time, I found a problem in
the language that won't fit my design needs, so, I expect my solicitation to be
valid.
Reproduce code:
---------------
-
Expected result:
----------------
-
Actual result:
--------------
-
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=47228&edit=1