CacheController.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <?php
  2. namespace App\Core\Cache;
  3. use \App\Core\Template\Output as Output;
  4. use \App\Core\Cache\Classes\Cache as Cache;
  5. use RR\Response;
  6. class CacheController extends \DefaultController
  7. {
  8. protected $_class = Cache::class;
  9. protected $_baseUrl = '/cache';
  10. /**
  11. * Index
  12. * Show the main Cache list
  13. */
  14. function index()
  15. {
  16. Output::render('index', array('list' => Cache::findAll()));
  17. }
  18. /**
  19. * Create
  20. *
  21. * Render the main Cache formulary
  22. */
  23. function create()
  24. {
  25. Output::render('form', ['id' => 0]);
  26. }
  27. /**
  28. * Store
  29. *
  30. * Store the param on the database
  31. * @param Cache $cache
  32. */
  33. function store(Cache $cache)
  34. {
  35. }
  36. /**
  37. * Search
  38. *
  39. * Store the param on the database
  40. * @param Cache $cache
  41. */
  42. function search()
  43. {
  44. }
  45. /**
  46. * Show
  47. *
  48. * Render one register
  49. *
  50. * @param Cache $cache
  51. */
  52. function show(Cache $cache)
  53. {
  54. Response::json(stripslashes($cache->value))->send();
  55. }
  56. /**
  57. * Edit
  58. *
  59. * Render the formular for a database Cache
  60. *
  61. * @param Cache $cache
  62. */
  63. function edit(Cache $cache)
  64. {
  65. Output::render('form', $cache);
  66. }
  67. /**
  68. * Update
  69. * Store the changes of the param on the database
  70. *
  71. * @param Cache $cache
  72. */
  73. function update(Cache $cache)
  74. {
  75. }
  76. /**
  77. * Destroy
  78. * If the object has soft delete.
  79. *
  80. * @param Cache $cache
  81. */
  82. function destroy(Cache $cache)
  83. {
  84. }
  85. /**
  86. * Purge
  87. * Remove object even with soft delete.
  88. *
  89. * @param Cache $cache
  90. */
  91. function purge(Cache $cache)
  92. {
  93. }
  94. }