Entity.php 841 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Test\Unit\Interception\Sample;
  7. /**
  8. * Sample class
  9. */
  10. class Entity
  11. {
  12. /**
  13. * @var array
  14. */
  15. private $pluginCalls = [];
  16. /**
  17. * Sample method
  18. *
  19. * @return bool
  20. */
  21. public function doSomething()
  22. {
  23. $this->addPluginCall(self::class . '::' . __FUNCTION__);
  24. return true;
  25. }
  26. /**
  27. * Get plugin calls info for testing
  28. *
  29. * @return array
  30. */
  31. public function getPluginCalls()
  32. {
  33. return $this->pluginCalls;
  34. }
  35. /**
  36. * Add plugin call info for testing
  37. *
  38. * @param string $call
  39. * @return void
  40. */
  41. public function addPluginCall($call)
  42. {
  43. $this->pluginCalls[] = $call;
  44. }
  45. }