Expression.php 453 B

1234567891011121314151617181920212223
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Rule\Model\Condition\Sql;
  7. /**
  8. * Abstract Rule sql condition
  9. */
  10. class Expression extends \Zend_Db_Expr
  11. {
  12. /**
  13. * Turn expression in this object into string
  14. *
  15. * @return string
  16. */
  17. public function __toString()
  18. {
  19. return empty($this->_expression) ? '' : '(' . $this->_expression . ')';
  20. }
  21. }