FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
arraybase/src/Query/Objects/GroupedDataSet.php at master · whizsid/arraybase · GitHub
whizsid
/
arraybase
Public
Notifications
You must be signed in to change notification settings
Fork
1
Star
18
Code
Issues
1
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
arraybase
/
src
/
Query
/
Objects
/
GroupedDataSet.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
87 lines (78 loc) · 1.6 KB
Breadcrumbs
arraybase
/
src
/
Query
/
Objects
/
GroupedDataSet.php
Copy path
File metadata and controls
87 lines (78 loc) · 1.6 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?php
namespace
WhizSid
\
ArrayBase
\
Query
\
Objects
;
use
WhizSid
\
ArrayBase
\
AB
\
DataSet
;
use
WhizSid
\
ArrayBase
\
Functions
\
Agregate
;
use
WhizSid
\
ArrayBase
\
Helper
;
class
GroupedDataSet
{
/**
* Hashed variable of all values in order clause.
*
* @var string
*/
protected
$
hash
;
/**
* Data set that in one group.
*
* @var DataSet
*/
protected
$
dataSet
;
/**
* Storing a dataset.
*
* @param DataSet $set
*/
public
function
setDataSet
(
$
set
)
{
$
this
->
dataSet
=
$
set
;
}
/**
* Returning the data set.
*
* @return DataSet
*/
public
function
getDataSet
()
{
return
$
this
->
dataSet
;
}
/**
* Setting the has.
*
* @param string $hash
*/
public
function
setHash
(
$
hash
)
{
$
this
->
hash
=
$
hash
;
}
/**
* Matching the hash.
*
* @param string $matchMe
*
* @return bool
*/
public
function
match
(
$
matchMe
)
{
return
$
this
->
hash
==
$
matchMe
;
}
/**
* Returning a value from grouped set.
*
* @param mixed $var
*
* @return mixed
*/
public
function
getValue
(
$
var
)
{
if
(Helper::
isColumn
(
$
var
)) {
return
$
this
->
dataSet
->
getCell
(
$
var
,
0
)->
getValue
();
}
elseif
(Helper::
isAgregate
(
$
var
)) {
/* @var Agregate $var */
return
$
var
->
setGroupedSet
(
$
this
)->
execute
();
}
elseif
(Helper::
isFunction
(
$
var
)) {
return
$
var
->
setDataSet
(
$
this
->
dataSet
)->
execute
(
0
);
}
else
{
return
$
var
;
}
}
}
Back
|
FazBrowse Home
|
New Git URL