Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
framework
DB
Sql
UnionExpression.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\DB\Sql
;
7
8
use
Magento\Framework\DB\Select
;
9
13
class
UnionExpression
extends
Expression
14
{
18
protected
$parts
;
19
23
protected
$type
;
24
29
public
function
__construct
(array
$parts
,
$type
=
Select::SQL_UNION
)
30
{
31
$this->parts =
$parts
;
32
$this->type =
$type
;
33
}
34
38
public
function
__toString
()
39
{
40
$parts
= [];
41
foreach
($this->parts as $part) {
42
if
($part instanceof
Select
) {
43
$parts
[] = sprintf(
'(%s)'
, $part->assemble());
44
}
else
{
45
$parts
[] = $part;
46
}
47
}
48
return
implode(
$parts
, $this->type);
49
}
50
}
Magento\Framework\DB\Sql\UnionExpression\$type
$type
Definition:
UnionExpression.php:23
Magento\Framework\DB\Select
Definition:
Select.php:33
Magento\Framework\DB\Sql
Definition:
ColumnValueExpression.php:6
Magento\Framework\DB\Sql\UnionExpression
Definition:
UnionExpression.php:13
Magento\Framework\DB\Sql\UnionExpression\__construct
__construct(array $parts, $type=Select::SQL_UNION)
Definition:
UnionExpression.php:29
Zend_Db_Select\SQL_UNION
const SQL_UNION
Definition:
Select.php:68
Magento\Framework\DB\Sql\UnionExpression\$parts
$parts
Definition:
UnionExpression.php:18
Magento\Framework\DB\Sql\UnionExpression\__toString
__toString()
Definition:
UnionExpression.php:38
Magento\Framework\DB\Select
Definition:
ColumnsRenderer.php:6
Magento\Framework\DB\Sql\Expression
Definition:
Expression.php:11