PrimitiveInterface.php 615 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace Drupal\Core\TypedData;
  3. /**
  4. * Interface for primitive data.
  5. *
  6. * @ingroup typed_data
  7. */
  8. interface PrimitiveInterface {
  9. /**
  10. * Gets the primitive data value.
  11. *
  12. * @return mixed
  13. */
  14. public function getValue();
  15. /**
  16. * Sets the primitive data value.
  17. *
  18. * @param mixed|null $value
  19. * The value to set in the format as documented for the data type or NULL to
  20. * unset the data value.
  21. */
  22. public function setValue($value);
  23. /**
  24. * Gets the primitive data value casted to the correct PHP type.
  25. *
  26. * @return mixed
  27. */
  28. public function getCastedValue();
  29. }