DbSelectParenthesis: allow to defer Db Expr...

...stringification when required to apply parenthesis (-> union)
This commit is contained in:
Thomas Gelf 2021-08-16 10:50:44 +02:00
parent 7c553257a6
commit 44a90afea2

View File

@ -0,0 +1,24 @@
<?php
namespace Icinga\Module\Director\Db;
class DbSelectParenthesis extends \Zend_Db_Expr
{
protected $select;
public function __construct(\Zend_Db_Select $select)
{
parent::__construct('');
$this->select = $select;
}
public function getSelect()
{
return $this->select;
}
public function __toString()
{
return '(' . $this->select . ')';
}
}