expression.php 607 B

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