We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b556ff4 + af03c01 commit fc68f1cCopy full SHA for fc68f1c
1 file changed
src/QueryObjectDataSource.php
@@ -33,6 +33,9 @@ class QueryObjectDataSource implements IDataSource {
33
/** @var callable */
34
public $limitCallback;
35
36
+ /** @var array */
37
+ private $data;
38
+
39
/**
40
* @param \Kdyby\Doctrine\QueryObject $queryObject
41
* @param \Kdyby\Doctrine\EntityRepository $repo
@@ -105,9 +108,21 @@ public function getCount(): int {
105
108
* @return array
106
109
*/
107
110
public function getData(): array {
111
+ if ($this->data) {
112
+ return $this->data;
113
+ }
114
return $this->getResultSet()->toArray();
115
}
116
117
+ /**
118
+ * Set the data
119
+ * @return $this
120
+ */
121
+ public function setData($data) {
122
+ $this->data = $data;
123
+ return $this;
124
125
126
127
* Filter data
128
* @param array $filters
0 commit comments