Resource.php 840 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. /**
  3. *
  4. * Cube Framework $Id$ +rqEFxueOoj9b2UujXEvo+rn9PXBT+yo5sj3OD3y5ik=
  5. *
  6. * @link http://codecu.be/framework
  7. * @copyright Copyright (c) 2014 CodeCube SRL
  8. * @license http://codecu.be/framework/license Commercial License
  9. *
  10. * @version 1.0
  11. */
  12. /**
  13. * acl resource class
  14. */
  15. namespace Cube\Permissions;
  16. class Resource implements ResourceInterface
  17. {
  18. /**
  19. *
  20. * resource id
  21. *
  22. * @var string
  23. */
  24. protected $_id;
  25. /**
  26. *
  27. * class constructor
  28. *
  29. * @param string $id the resource id/name
  30. */
  31. public function __construct($id)
  32. {
  33. $this->_id = (string) $id;
  34. }
  35. /**
  36. *
  37. * get resource id
  38. *
  39. * @return string the resource id/name
  40. */
  41. public function getId()
  42. {
  43. return $this->_id;
  44. }
  45. }