mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
DbSelectParenthesis: allow to defer Db Expr...
...stringification when required to apply parenthesis (-> union)
This commit is contained in:
parent
7c553257a6
commit
44a90afea2
24
library/Director/Db/DbSelectParenthesis.php
Normal file
24
library/Director/Db/DbSelectParenthesis.php
Normal 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 . ')';
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user