GroupInterface.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. /*
  3. * This file is part of the FOSUserBundle package.
  4. *
  5. * (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace FOS\UserBundle\Model;
  11. /**
  12. * @author Johannes M. Schmitt <schmittjoh@gmail.com>
  13. * @author Christophe Coevoet <stof@notk.org>
  14. */
  15. interface GroupInterface
  16. {
  17. /**
  18. * @param string $role
  19. *
  20. * @return self
  21. */
  22. public function addRole($role);
  23. /**
  24. * @return integer
  25. */
  26. public function getId();
  27. /**
  28. * @return string
  29. */
  30. public function getName();
  31. /**
  32. * @param string $role
  33. *
  34. * @return boolean
  35. */
  36. public function hasRole($role);
  37. /**
  38. * @return array
  39. */
  40. public function getRoles();
  41. /**
  42. * @param string $role
  43. *
  44. * @return self
  45. */
  46. public function removeRole($role);
  47. /**
  48. * @param string $name
  49. *
  50. * @return self
  51. */
  52. public function setName($name);
  53. /**
  54. * @param array $roles
  55. *
  56. * @return self
  57. */
  58. public function setRoles(array $roles);
  59. }