AppThreat / chen

Code Hierarchy Exploration Net (chen)
https://appthreat.com
Apache License 2.0
14 stars 2 forks source link

[php] support for method attributes #50

Open prabhu opened 10 months ago

prabhu commented 10 months ago

Method attributes are used by frameworks such as Symfony to specify routes and other information.

// src/Controller/BlogController.php
namespace App\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;

class BlogController extends AbstractController
{
    #[Route('/blog', name: 'blog_list')]
    public function list(): Response
    {
        // ...
    }
}

https://www.php.net/manual/en/language.attributes.overview.php https://symfony.com/doc/current/routing.html