ManagementInterface.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. /**
  3. * Copyright © 2016 Ihor Vansach (ihor@magefan.com). All rights reserved.
  4. * See LICENSE.txt for license details (http://opensource.org/licenses/osl-3.0.php).
  5. *
  6. * Glory to Ukraine! Glory to the heroes!
  7. */
  8. namespace Magefan\Blog\Api;
  9. interface ManagementInterface
  10. {
  11. /**
  12. * Create new item.
  13. *
  14. * @api
  15. * @param string $data.
  16. * @return string.
  17. */
  18. public function create($data);
  19. /**
  20. * Update item by id.
  21. *
  22. * @api
  23. * @param int $id.
  24. * @param string $data.
  25. * @return string.
  26. */
  27. public function update($id, $data);
  28. /**
  29. * Remove item by id.
  30. *
  31. * @api
  32. * @param int $id.
  33. * @return bool.
  34. */
  35. public function delete($id);
  36. /**
  37. * Get item by id.
  38. *
  39. * @api
  40. * @param int $id.
  41. * @return bool.
  42. */
  43. public function get($id);
  44. /**
  45. * Get item by id and store id, only if item published
  46. *
  47. * @api
  48. * @param int $id
  49. * @param int $storeId
  50. * @return bool.
  51. */
  52. public function view($id, $storeId);
  53. }