Expression.php 761 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace Illuminate\Database\Query;
  3. use Illuminate\Contracts\Database\Query\Expression as ExpressionContract;
  4. use Illuminate\Database\Grammar;
  5. class Expression implements ExpressionContract
  6. {
  7. /**
  8. * The value of the expression.
  9. *
  10. * @var string|int|float
  11. */
  12. protected $value;
  13. /**
  14. * Create a new raw query expression.
  15. *
  16. * @param string|int|float $value
  17. * @return void
  18. */
  19. public function __construct($value)
  20. {
  21. $this->value = $value;
  22. }
  23. /**
  24. * Get the value of the expression.
  25. *
  26. * @param \Illuminate\Database\Grammar $grammar
  27. * @return string|int|float
  28. */
  29. public function getValue(Grammar $grammar)
  30. {
  31. return $this->value;
  32. }
  33. }