File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33namespace ProgrammatorDev \Api \Builder ;
44
5+ use ProgrammatorDev \Api \Method ;
56use Psr \Cache \CacheItemPoolInterface ;
67
78class CacheBuilder
89{
910 public function __construct (
1011 private CacheItemPoolInterface $ pool ,
1112 private ?int $ ttl = 60 ,
12- private array $ methods = [' GET ' , ' HEAD ' ],
13+ private array $ methods = [Method:: GET , Method:: HEAD ],
1314 private array $ responseCacheDirectives = ['no-cache ' , 'max-age ' ]
1415 ) {}
1516
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace ProgrammatorDev \Api ;
4+
5+ class Method
6+ {
7+ public const GET = 'GET ' ;
8+ public const HEAD = 'HEAD ' ;
9+ public const POST = 'POST ' ;
10+ public const PUT = 'PUT ' ;
11+ public const DELETE = 'DELETE ' ;
12+ public const CONNECT = 'CONNECT ' ;
13+ public const OPTIONS = 'OPTIONS ' ;
14+ public const TRACE = 'TRACE ' ;
15+ public const PATCH = 'PATCH ' ;
16+ }
You can’t perform that action at this time.
0 commit comments