ComplexService.php 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace JMS\SecurityExtraBundle\Tests\Fixtures;
  3. use JMS\SecurityExtraBundle\Annotation\SecureReturn;
  4. use JMS\SecurityExtraBundle\Annotation\SecureParam;
  5. use JMS\SecurityExtraBundle\Annotation\Secure;
  6. interface E {
  7. /**
  8. * @SecureReturn(permissions="VIEW,UNDELETE")
  9. */
  10. function retrieve();
  11. }
  12. interface F {
  13. /**
  14. * @SecureParam(name="secure", permissions="OWNER")
  15. * @SecureParam(name="foo", permissions="MASTER, EDIT")
  16. */
  17. function delete($foo, $asdf, $secure);
  18. }
  19. interface C { }
  20. interface D extends F {}
  21. interface B extends C, E { }
  22. abstract class G implements F, E {
  23. /**
  24. * @Secure(roles="ROLE_FOO, IS_AUTHENTICATED_FULLY")
  25. * @SecureParam(name="secure", permissions="FOO")
  26. * @SecureReturn(permissions="WOW")
  27. */
  28. abstract function abstractMethod($foo, $secure);
  29. }
  30. class A extends G implements C, B, D {
  31. public function retrieve() { }
  32. public function delete($one, $two, $three) { }
  33. public function abstractMethod($asdf, $wohoo) { }
  34. }
  35. class ComplexService extends A implements C { }