icingaweb2-module-director/library/Director/Db/DbSelectParenthesis.php
Thomas Gelf 44a90afea2 DbSelectParenthesis: allow to defer Db Expr...
...stringification when required to apply parenthesis (-> union)
2021-08-16 10:51:57 +02:00

25 lines
419 B
PHP

<?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 . ')';
}
}