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.

UsersSettingsController.php 979B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: robin
  5. * Date: 10/3/16
  6. * Time: 6:07 PM
  7. */
  8. namespace App\Controller;
  9. use App\Business\UsersSettingsBusiness;
  10. use Luticate\Utils\Dbo\LuStringDbo;
  11. class UsersSettingsController
  12. {
  13. public function getBusiness()
  14. {
  15. return new UsersSettingsBusiness();
  16. }
  17. /**
  18. * Set the encrypted settings to be saved
  19. * @param LuStringDbo $settings The encrypted settings
  20. * @param LuStringDbo $id The user facebook id
  21. * @trim
  22. * @min 1
  23. * @return bool
  24. */
  25. public function put(LuStringDbo $settings, LuStringDbo $id)
  26. {
  27. return static::getBusiness()->put($settings->getString(), $id->getString());
  28. }
  29. /**
  30. * Get the previously saved encrypted settings
  31. * @param LuStringDbo $id The user facebook id
  32. * @trim
  33. * @min 1
  34. * @return string
  35. */
  36. public function get(LuStringDbo $id)
  37. {
  38. return static::getBusiness()->get($id->getString());
  39. }
  40. }