Expression.php 694B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. namespace Illuminate\Database\Query;
  3. class Expression
  4. {
  5. /**
  6. * The value of the expression.
  7. *
  8. * @var mixed
  9. */
  10. protected $value;
  11. /**
  12. * Create a new raw query expression.
  13. *
  14. * @param mixed $value
  15. * @return void
  16. */
  17. public function __construct($value)
  18. {
  19. $this->value = $value;
  20. }
  21. /**
  22. * Get the value of the expression.
  23. *
  24. * @return mixed
  25. */
  26. public function getValue()
  27. {
  28. return $this->value;
  29. }
  30. /**
  31. * Get the value of the expression.
  32. *
  33. * @return string
  34. */
  35. public function __toString()
  36. {
  37. return (string) $this->getValue();
  38. }
  39. }