Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Kaa Framework
Demo Application
Forum
Commits
3eda05e3
Commit
3eda05e3
authored
1 year ago
by
Ilya Petrovanov
Browse files
Options
Download
Patches
Plain Diff
fix: controller
parent
2e11c91e
main
1 merge request
!3
KTemplate Bundle
Pipeline
#145645
failed with stages
in 55 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Controller/ExampleController.php
+9
-3
src/Controller/ExampleController.php
with
9 additions
and
3 deletions
+9
-3
src/Controller/ExampleController.php
+
9
−
3
View file @
3eda05e3
...
@@ -13,14 +13,20 @@ use KTemplate\Engine;
...
@@ -13,14 +13,20 @@ use KTemplate\Engine;
class
ExampleController
class
ExampleController
{
{
private
Engine
$ktemplate
;
public
function
__construct
(
Engine
$ktemplate
)
{
$this
->
ktemplate
=
$ktemplate
;
}
#[Get('/test')]
#[Get('/test')]
public
function
test
(
public
function
test
(
#[Inject]
Engine
$ktemplate
,
#[MapQueryParameter]
#[MapQueryParameter]
string
$name
string
$name
)
:
Response
{
)
:
Response
{
return
new
Response
(
$ktemplate
->
render
(
'greeting'
,
new
ArrayDataProvider
([
'name'
=>
$name
])));
return
new
Response
(
$
this
->
ktemplate
->
render
(
'greeting'
,
new
ArrayDataProvider
([
'name'
=>
$name
])));
}
}
#[Get('/test/{id}')]
#[Get('/test/{id}')]
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets