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.

SpLuGetAllUserPermission.php 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. /**
  3. * AUTO GENERATED BY LUTICATE GENERATOR
  4. * ANY CHANGES WILL BE OVERWRITTEN
  5. */
  6. namespace Luticate\Auth\DataAccess\SP;
  7. use Luticate\Utils\LuSpModel;
  8. use Illuminate\Support\Facades\DB;
  9. class SpLuGetAllUserPermission extends LuSpModel {
  10. protected static function damToDbo($dam)
  11. {
  12. if (is_null($dam))
  13. return null;
  14. $dbo = new SpLuGetAllUserPermission();
  15. $dbo->setPermissonName($dam->_permisson_name);
  16. $dbo->setVal($dam->val);
  17. return $dbo;
  18. }
  19. public static function execute($_user_id)
  20. {
  21. $values = DB::select('SELECT * FROM sp_lu_get_all_user_permission(?)', array($_user_id));
  22. $dboValues = array();
  23. foreach ($values as $value)
  24. $dboValues[] = self::damToDbo($value);
  25. return $dboValues;
  26. }
  27. /**
  28. * @var string
  29. */
  30. protected $_PermissonName;
  31. public function getPermissonName()
  32. {
  33. return $this->_PermissonName;
  34. }
  35. public function setPermissonName($value)
  36. {
  37. $this->_PermissonName = $value;
  38. }
  39. /**
  40. * @var boolean
  41. */
  42. protected $_val;
  43. public function getVal()
  44. {
  45. return $this->_val;
  46. }
  47. public function setVal($value)
  48. {
  49. $this->_val = $value;
  50. }
  51. }