TokenRendererInterface.php 839 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Vault\Block;
  7. use Magento\Vault\Api\Data\PaymentTokenInterface;
  8. /**
  9. * Interface TokenRendererInterface
  10. * @api
  11. * @since 100.1.0
  12. */
  13. interface TokenRendererInterface
  14. {
  15. /**
  16. * Can render specified token
  17. *
  18. * @param PaymentTokenInterface $token
  19. * @return boolean
  20. * @since 100.1.0
  21. */
  22. public function canRender(PaymentTokenInterface $token);
  23. /**
  24. * Renders specified token
  25. *
  26. * @param PaymentTokenInterface $token
  27. * @return string
  28. * @since 100.1.0
  29. */
  30. public function render(PaymentTokenInterface $token);
  31. /**
  32. * Get payment token
  33. * @return PaymentTokenInterface|null
  34. * @since 100.2.0
  35. */
  36. public function getToken();
  37. }