88use JsonSerializable ;
99use Tempest \Http \Cookie \Cookie ;
1010use Tempest \Http \Cookie \CookieManager ;
11- use Tempest \Http \Session \Session ;
1211use Tempest \View \View ;
1312
1413use function Tempest \get ;
@@ -23,10 +22,6 @@ trait IsResponse
2322 /** @var \Tempest\Http\Header[] */
2423 private(set) array $ headers = [];
2524
26- public Session $ session {
27- get => get (Session::class);
28- }
29-
3025 public CookieManager $ cookieManager {
3126 get => get (CookieManager::class);
3227 }
@@ -72,27 +67,6 @@ public function removeHeader(string $key): self
7267 return $ this ;
7368 }
7469
75- public function addSession (string $ name , mixed $ value ): self
76- {
77- $ this ->session ->set ($ name , $ value );
78-
79- return $ this ;
80- }
81-
82- public function removeSession (string $ name ): self
83- {
84- $ this ->session ->remove ($ name );
85-
86- return $ this ;
87- }
88-
89- public function destroySession (): self
90- {
91- $ this ->session ->destroy ();
92-
93- return $ this ;
94- }
95-
9670 public function addCookie (Cookie $ cookie ): self
9771 {
9872 $ this ->cookieManager ->add ($ cookie );
@@ -107,13 +81,6 @@ public function removeCookie(string $key): self
10781 return $ this ;
10882 }
10983
110- public function flash (string $ key , mixed $ value ): self
111- {
112- $ this ->session ->flash ($ key , $ value );
113-
114- return $ this ;
115- }
116-
11784 public function setContentType (ContentType $ contentType ): self
11885 {
11986 $ this ->removeHeader (ContentType::HEADER )
0 commit comments