Expression.php 568 B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\DB\Sql;
  7. /**
  8. * Class is wrapper over Zend_Db_Expr for implement JsonSerializable interface.
  9. */
  10. class Expression extends \Zend_Db_Expr implements ExpressionInterface, \JsonSerializable
  11. {
  12. /**
  13. * @inheritdoc
  14. */
  15. public function jsonSerialize()
  16. {
  17. return [
  18. 'class' => static::class,
  19. 'arguments' => [
  20. 'expression' => $this->_expression,
  21. ],
  22. ];
  23. }
  24. }