Req #47228 [Opn->Sus]: New magic method like __call, but that is called even if the method exists
| From: | cmb@php.net | Date: | Sat, 31 Dec 2016 17:21:37 +0000 |
| Subject: | Req #47228 [Opn->Sus]: New magic method like __call, but that is called even if the method exists | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-206266@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=47228&edit=1
ID: 47228
Updated by: cmb@php.net
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
+Status: Suspended
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:
> Where I have to apply as Developer to fix that ?
You can apply for an VCS account via <http://php.net/git-php.php>.
However, this feature would require to pass the RFC process[1], so
I'm suspending this ticket.
[1] <https://wiki.php.net/rfc/howto>
Previous Comments:
------------------------------------------------------------------------
[2013-09-19 22:04:05] metamarkers at gmail dot com
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.
------------------------------------------------------------------------
[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