ArticleController.php 628 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace internship\controller;
  3. use n2n\web\http\controller\ControllerAdapter;
  4. use internship\model\ArticleDao;
  5. use n2n\context\attribute\Inject;
  6. class ArticleController extends ControllerAdapter {
  7. #[Inject()]
  8. private ArticleDao $articleDao;
  9. /**
  10. *
  11. * @param string|null $categoryName
  12. * @return void
  13. */
  14. function getDoArticles(string $categoryName = null) {
  15. echo 'irgendöpis';
  16. $this->sendJson(['hello' => 'world']);
  17. }
  18. function getDoArticle(int $articleId) {
  19. $this->sendJson($article);
  20. }
  21. function postDoArticle() {
  22. }
  23. function putDoArticle() {
  24. }
  25. function deleteDoArticle() {
  26. }
  27. }