You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ImagesController.php 980B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace App\Http\Controller;
  3. use App\Http\DBO\ImageUploadDbo;
  4. use Luticate\Auth\DBO\LuticateUsersDbo;
  5. use Luticate\Utils\Dbo\LuIntDbo;
  6. use Luticate\Utils\LuController;
  7. use App\Http\Business\ImagesBusiness;
  8. use App\Http\DBO\ImagesDbo;
  9. class ImagesController extends LuController {
  10. protected function getBusiness()
  11. {
  12. return new ImagesBusiness();
  13. }
  14. public function getAll($only_mine, LuticateUsersDbo $_user, $page = 0, $perPage = 20000000)
  15. {
  16. return ImagesBusiness::getAllLite($only_mine == "true", $_user, $page, $perPage);
  17. }
  18. public function getRawById($image_id)
  19. {
  20. return ImagesBusiness::getRawById($image_id);
  21. }
  22. public function upload(ImageUploadDbo $image, LuticateUsersDbo $_user)
  23. {
  24. return ImagesBusiness::upload($image, $_user);
  25. }
  26. public function del(LuIntDbo $image_id, LuticateUsersDbo $_user)
  27. {
  28. return ImagesBusiness::del($image_id->getInt(), $_user);
  29. }
  30. }