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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Sat May 04 11:01:32 2024 UTC