Expr.php 802 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /**
  3. *
  4. * Cube Framework $Id$ j3yy+IE9tSkfPiDRKtbS4Po9kldOrjca2yobpem5Nts=
  5. *
  6. * @link http://codecu.be/framework
  7. * @copyright Copyright (c) 2014 CodeCube SRL
  8. * @license http://codecu.be/framework/license Commercial License
  9. *
  10. * @version 1.0
  11. */
  12. /**
  13. * db expression class
  14. */
  15. namespace Cube\Db;
  16. class Expr
  17. {
  18. /**
  19. *
  20. * @var string
  21. */
  22. protected $_expression;
  23. /**
  24. *
  25. * class constructor
  26. *
  27. * @param string $expression
  28. */
  29. public function __construct($expression)
  30. {
  31. $this->_expression = (string) $expression;
  32. }
  33. /**
  34. *
  35. * magic method
  36. * return the expression
  37. *
  38. * @return string
  39. */
  40. public function __toString()
  41. {
  42. return $this->_expression;
  43. }
  44. }