Skip to content

Commit 797cb5b

Browse files
committed
Merge branch 'release/0.9.14'
2 parents 96c176d + 1629ebe commit 797cb5b

File tree

4 files changed

+51
-1
lines changed

4 files changed

+51
-1
lines changed

.version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"strategy": "semver",
33
"major": 0,
44
"minor": 9,
5-
"patch": 13,
5+
"patch": 14,
66
"build": 0
77
}

src/Mvc/Controllers/IController.php

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,52 @@
1818
*/
1919
interface IController
2020
{
21+
/**
22+
* Constructor for the controller.
23+
*
24+
* @param Application|null $app The application instance.
25+
*/
2126
public function __construct( ?Application $app );
2227

28+
/**
29+
* Renders an HTML response.
30+
*
31+
* @param HttpResponseStatus $responseCode The HTTP response status code.
32+
* @param array $data Data to be passed to the view.
33+
* @param string $page The view page to render.
34+
* @param string $layout The layout to use for rendering.
35+
* @param bool|null $cacheEnabled Whether caching is enabled for this response.
36+
* @return string The rendered HTML content.
37+
*/
2338
public function renderHtml( HttpResponseStatus $responseCode, array $data = [], string $page = "index", string $layout = "default", ?bool $cacheEnabled = null ) : string;
39+
40+
/**
41+
* Renders a Markdown response.
42+
*
43+
* @param HttpResponseStatus $responseCode The HTTP response status code.
44+
* @param array $data Data to be passed to the view.
45+
* @param string $page The view page to render.
46+
* @param string $layout The layout to use for rendering.
47+
* @param bool|null $cacheEnabled Whether caching is enabled for this response.
48+
* @return string The rendered Markdown content.
49+
*/
50+
public function renderMarkdown( HttpResponseStatus $responseCode, array $data = [], string $page = "index", string $layout = "default", ?bool $cacheEnabled = null ) : string;
51+
52+
/**
53+
* Renders a JSON response.
54+
*
55+
* @param HttpResponseStatus $responseCode The HTTP response status code.
56+
* @param array $data Data to be included in the JSON response.
57+
* @return string The rendered JSON content.
58+
*/
2459
public function renderJson( HttpResponseStatus $responseCode, array $data = [] ) : string;
60+
61+
/**
62+
* Renders an XML response.
63+
*
64+
* @param HttpResponseStatus $responseCode The HTTP response status code.
65+
* @param array $data Data to be included in the XML response.
66+
* @return string The rendered XML content.
67+
*/
2568
public function renderXml( HttpResponseStatus $responseCode, array $data = [] ) : string;
2669
}

tests/Mvc/Controllers/ControllerFactoryTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ public function renderXml( HttpResponseStatus $ResponseCode, array $Data = [] ):
3838
{
3939
return 'xml';
4040
}
41+
42+
public function renderMarkdown( HttpResponseStatus $ResponseCode, array $Data = [], string $Page = "index", string $Layout = "default", ?bool $CacheEnabled = null ): string
43+
{
44+
return 'markdown';
45+
}
4146
}
4247

4348
class InvalidController

versionlog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
## 0.9.14 2025-11-27
2+
13
## 0.9.13 2025-11-27
24

35
## 0.9.12 2025-11-27

0 commit comments

Comments
 (0)