php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #66868 Add support for decorators
Submitted: 2014-03-09 17:46 UTC Modified: 2015-03-30 04:02 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: eldmannen+php at gmail dot com Assigned: kalle (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: eldmannen+php at gmail dot com
New email:
PHP Version: OS:

 

 [2014-03-09 17:46 UTC] eldmannen+php at gmail dot com
Description:
------------
Add support for decorators that can be used to decorate methods and classes.
The decorator pattern - https://en.wikipedia.org/wiki/Decorator_pattern

C# have support for decorators, and in ASP.NET MVC you can use decorators such as [Authorize] and [HttpPost].

[Authorize]
public ActionResult Foo() {
    // Code here
}

Only authorized users can reach Foo, other users will be redirected to the login page.




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-03-30 03:04 UTC] kalle@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: kalle
 [2015-03-30 03:04 UTC] kalle@php.net
This should be an RFC instead of a ticket, which will allow it to have a better and boarder discussion, see our wiki for more details:

 <https://wiki.php.net/>
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Oct 06 13:00:01 2026 UTC