repository_name stringlengths 5 67 | func_path_in_repository stringlengths 4 234 | func_name stringlengths 0 314 | whole_func_string stringlengths 52 3.87M | language stringclasses 6
values | func_code_string stringlengths 52 3.87M | func_code_tokens listlengths 15 672k | func_documentation_string stringlengths 1 47.2k | func_documentation_tokens listlengths 1 3.92k | split_name stringclasses 1
value | func_code_url stringlengths 85 339 |
|---|---|---|---|---|---|---|---|---|---|---|
koolphp/koolreport | src/processes/ValueMap.php | ValueMap.onInit | protected function onInit()
{
if (is_array($this->params)) {
foreach ($this->params as $cName => $cMap) {
$cFunc = Utility::get($cMap, "{func}");
if (is_callable($cFunc)) {
$this->mapFuncs[$cName] = $cFunc;
}
}
... | php | protected function onInit()
{
if (is_array($this->params)) {
foreach ($this->params as $cName => $cMap) {
$cFunc = Utility::get($cMap, "{func}");
if (is_callable($cFunc)) {
$this->mapFuncs[$cName] = $cFunc;
}
}
... | [
"protected",
"function",
"onInit",
"(",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"this",
"->",
"params",
")",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"params",
"as",
"$",
"cName",
"=>",
"$",
"cMap",
")",
"{",
"$",
"cFunc",
"=",
"Utility",
... | Handle on initation
@return null | [
"Handle",
"on",
"initation"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/ValueMap.php#L56-L68 |
koolphp/koolreport | src/processes/ValueMap.php | ValueMap.onMetaReceived | protected function onMetaReceived($metaData)
{
if (is_array($this->params)) {
foreach ($this->params as $cName => $cMap) {
if (is_array($cMap)) {
$cMeta = Utility::get($cMap, "{meta}");
if ($cMeta) {
$override = Util... | php | protected function onMetaReceived($metaData)
{
if (is_array($this->params)) {
foreach ($this->params as $cName => $cMap) {
if (is_array($cMap)) {
$cMeta = Utility::get($cMap, "{meta}");
if ($cMeta) {
$override = Util... | [
"protected",
"function",
"onMetaReceived",
"(",
"$",
"metaData",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"this",
"->",
"params",
")",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"params",
"as",
"$",
"cName",
"=>",
"$",
"cMap",
")",
"{",
"if",
"... | Handle on meta received
@param array $metaData The meta data
@return array New meta data | [
"Handle",
"on",
"meta",
"received"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/ValueMap.php#L77-L99 |
koolphp/koolreport | src/processes/ValueMap.php | ValueMap.onInput | protected function onInput($row)
{
if (is_array($this->params)) {
foreach ($this->params as $cName => $cMap) {
if (isset($this->mapFuncs[$cName])) {
$row[$cName] = $this->mapFuncs[$cName]($row[$cName]);
} else if (is_array($cMap)) {
... | php | protected function onInput($row)
{
if (is_array($this->params)) {
foreach ($this->params as $cName => $cMap) {
if (isset($this->mapFuncs[$cName])) {
$row[$cName] = $this->mapFuncs[$cName]($row[$cName]);
} else if (is_array($cMap)) {
... | [
"protected",
"function",
"onInput",
"(",
"$",
"row",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"this",
"->",
"params",
")",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"params",
"as",
"$",
"cName",
"=>",
"$",
"cMap",
")",
"{",
"if",
"(",
"isset... | Handle on data input
@param array $row The data row
@return null | [
"Handle",
"on",
"data",
"input"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/ValueMap.php#L108-L128 |
koolphp/koolreport | src/processes/DateTimeFormat.php | DateTimeFormat.onInit | protected function onInit()
{
foreach ($this->params as $cName => $cParams) {
if (gettype($cParams) == "string") {
$this->params[$cName] = array(
"to" => $cParams,
);
}
}
} | php | protected function onInit()
{
foreach ($this->params as $cName => $cParams) {
if (gettype($cParams) == "string") {
$this->params[$cName] = array(
"to" => $cParams,
);
}
}
} | [
"protected",
"function",
"onInit",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"params",
"as",
"$",
"cName",
"=>",
"$",
"cParams",
")",
"{",
"if",
"(",
"gettype",
"(",
"$",
"cParams",
")",
"==",
"\"string\"",
")",
"{",
"$",
"this",
"->",
"par... | Process initiation
@return null | [
"Process",
"initiation"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/DateTimeFormat.php#L45-L54 |
koolphp/koolreport | src/processes/DateTimeFormat.php | DateTimeFormat.onMetaReceived | protected function onMetaReceived($metaData)
{
foreach ($this->params as $cName => $cParams) {
$from = Utility::get($cParams, "from");
if (!$from) {
$from = Utility::get(
$metaData["columns"][$cName],
"format",
... | php | protected function onMetaReceived($metaData)
{
foreach ($this->params as $cName => $cParams) {
$from = Utility::get($cParams, "from");
if (!$from) {
$from = Utility::get(
$metaData["columns"][$cName],
"format",
... | [
"protected",
"function",
"onMetaReceived",
"(",
"$",
"metaData",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"params",
"as",
"$",
"cName",
"=>",
"$",
"cParams",
")",
"{",
"$",
"from",
"=",
"Utility",
"::",
"get",
"(",
"$",
"cParams",
",",
"\"from\"",
... | Handle on meta received
@param array $metaData The meta data
@return array New meta data | [
"Handle",
"on",
"meta",
"received"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/DateTimeFormat.php#L63-L89 |
koolphp/koolreport | src/processes/DateTimeFormat.php | DateTimeFormat.onInput | protected function onInput($data)
{
//Process data here
foreach ($this->params as $cName => $cParams) {
$from = Utility::get($cParams, "from", "Y-m-d H:i:s");
$to = Utility::get($cParams, "to", "Y-m-d H:i:s");
if ($data[$cName] && $from != $to) {
$... | php | protected function onInput($data)
{
//Process data here
foreach ($this->params as $cName => $cParams) {
$from = Utility::get($cParams, "from", "Y-m-d H:i:s");
$to = Utility::get($cParams, "to", "Y-m-d H:i:s");
if ($data[$cName] && $from != $to) {
$... | [
"protected",
"function",
"onInput",
"(",
"$",
"data",
")",
"{",
"//Process data here",
"foreach",
"(",
"$",
"this",
"->",
"params",
"as",
"$",
"cName",
"=>",
"$",
"cParams",
")",
"{",
"$",
"from",
"=",
"Utility",
"::",
"get",
"(",
"$",
"cParams",
",",
... | Handle on data input
@param array $data The input data row
@return null | [
"Handle",
"on",
"data",
"input"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/DateTimeFormat.php#L98-L110 |
koolphp/koolreport | src/processes/Join.php | Join.input | public function input($row, $source)
{
for ($i = 0; $i < count($this->container); $i++) {
if ($this->container[$i]["source"] === $source) {
$key = "";
foreach ($this->container[$i]["keys"] as $cName) {
$key .= $row[$cName];
}
... | php | public function input($row, $source)
{
for ($i = 0; $i < count($this->container); $i++) {
if ($this->container[$i]["source"] === $source) {
$key = "";
foreach ($this->container[$i]["keys"] as $cName) {
$key .= $row[$cName];
}
... | [
"public",
"function",
"input",
"(",
"$",
"row",
",",
"$",
"source",
")",
"{",
"for",
"(",
"$",
"i",
"=",
"0",
";",
"$",
"i",
"<",
"count",
"(",
"$",
"this",
"->",
"container",
")",
";",
"$",
"i",
"++",
")",
"{",
"if",
"(",
"$",
"this",
"->"... | Input
@param array $row The input data row
@param Node $source The source sending data
@return null | [
"Input"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/Join.php#L74-L91 |
koolphp/koolreport | src/processes/Join.php | Join.onInputEnd | protected function onInputEnd()
{
foreach ($this->container[0]["data"] as $key => $rows) {
if (isset($this->container[1]["data"][$key])) {
foreach ($rows as $first) {
foreach ($this->container[1]["data"][$key] as $second) {
$this->next(... | php | protected function onInputEnd()
{
foreach ($this->container[0]["data"] as $key => $rows) {
if (isset($this->container[1]["data"][$key])) {
foreach ($rows as $first) {
foreach ($this->container[1]["data"][$key] as $second) {
$this->next(... | [
"protected",
"function",
"onInputEnd",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"container",
"[",
"0",
"]",
"[",
"\"data\"",
"]",
"as",
"$",
"key",
"=>",
"$",
"rows",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"container",
"[",
... | Handle on input end
@return null | [
"Handle",
"on",
"input",
"end"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/Join.php#L98-L109 |
koolphp/koolreport | src/processes/Join.php | Join.receiveMeta | public function receiveMeta($metaData, $source)
{
if ($source === $this->container[0]["source"]) {
$this->container[0]["meta"] = $metaData;
} else {
$this->container[1]["meta"] = $metaData;
}
if ($this->container[0]["meta"] && $this->container[1]["meta"]) {
... | php | public function receiveMeta($metaData, $source)
{
if ($source === $this->container[0]["source"]) {
$this->container[0]["meta"] = $metaData;
} else {
$this->container[1]["meta"] = $metaData;
}
if ($this->container[0]["meta"] && $this->container[1]["meta"]) {
... | [
"public",
"function",
"receiveMeta",
"(",
"$",
"metaData",
",",
"$",
"source",
")",
"{",
"if",
"(",
"$",
"source",
"===",
"$",
"this",
"->",
"container",
"[",
"0",
"]",
"[",
"\"source\"",
"]",
")",
"{",
"$",
"this",
"->",
"container",
"[",
"0",
"]"... | Handle on meta data received
@param array $metaData The meta data received
@param Node $source The source sending data
@return null | [
"Handle",
"on",
"meta",
"data",
"received"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/Join.php#L119-L135 |
koolphp/koolreport | src/widgets/google/Timeline.php | Timeline.newClientDate | protected function newClientDate($value, $meta)
{
$format = Utility::get($meta, "format");
$type = Utility::get($meta, "type");
if ($format == null) {
switch ($type) {
case "date":
$format = "Y-m-d";
$toFormat = "Y,(n-1),d";
... | php | protected function newClientDate($value, $meta)
{
$format = Utility::get($meta, "format");
$type = Utility::get($meta, "type");
if ($format == null) {
switch ($type) {
case "date":
$format = "Y-m-d";
$toFormat = "Y,(n-1),d";
... | [
"protected",
"function",
"newClientDate",
"(",
"$",
"value",
",",
"$",
"meta",
")",
"{",
"$",
"format",
"=",
"Utility",
"::",
"get",
"(",
"$",
"meta",
",",
"\"format\"",
")",
";",
"$",
"type",
"=",
"Utility",
"::",
"get",
"(",
"$",
"meta",
",",
"\"... | Convert server-side date to client-side format
@param string $value The datetime
@param array $meta The meta data
@return string The client-side date format | [
"Convert",
"server",
"-",
"side",
"date",
"to",
"client",
"-",
"side",
"format"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/widgets/google/Timeline.php#L50-L78 |
koolphp/koolreport | src/widgets/google/Timeline.php | Timeline.onRender | protected function onRender()
{
$columns = $this->getColumnSettings();
//Update options
$options = $this->options;
if ($this->title) {
$options["title"] = $this->title;
}
if ($this->colorScheme) {
$options["colors"] = $this->colorScheme;
... | php | protected function onRender()
{
$columns = $this->getColumnSettings();
//Update options
$options = $this->options;
if ($this->title) {
$options["title"] = $this->title;
}
if ($this->colorScheme) {
$options["colors"] = $this->colorScheme;
... | [
"protected",
"function",
"onRender",
"(",
")",
"{",
"$",
"columns",
"=",
"$",
"this",
"->",
"getColumnSettings",
"(",
")",
";",
"//Update options",
"$",
"options",
"=",
"$",
"this",
"->",
"options",
";",
"if",
"(",
"$",
"this",
"->",
"title",
")",
"{",... | Handle on render
@return null | [
"Handle",
"on",
"render"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/widgets/google/Timeline.php#L85-L111 |
koolphp/koolreport | src/processes/Sort.php | Sort.sortProcess | public function sortProcess()
{
$sorts = [];
foreach ($this->params as $field => $direction) {
$sorts[trim($field)] = is_string($direction) ?
trim($direction) : $direction;
}
usort(
$this->data,
function ($a1, $a2) use ($sorts) {
... | php | public function sortProcess()
{
$sorts = [];
foreach ($this->params as $field => $direction) {
$sorts[trim($field)] = is_string($direction) ?
trim($direction) : $direction;
}
usort(
$this->data,
function ($a1, $a2) use ($sorts) {
... | [
"public",
"function",
"sortProcess",
"(",
")",
"{",
"$",
"sorts",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"this",
"->",
"params",
"as",
"$",
"field",
"=>",
"$",
"direction",
")",
"{",
"$",
"sorts",
"[",
"trim",
"(",
"$",
"field",
")",
"]",
"=",
... | Do sorting
@return null | [
"Do",
"sorting"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/Sort.php#L55-L97 |
koolphp/koolreport | src/processes/Sort.php | Sort.onInputEnd | public function onInputEnd()
{
$this->sortProcess();
foreach ($this->data as $row) {
$this->next($row);
}
unset($this->data);
} | php | public function onInputEnd()
{
$this->sortProcess();
foreach ($this->data as $row) {
$this->next($row);
}
unset($this->data);
} | [
"public",
"function",
"onInputEnd",
"(",
")",
"{",
"$",
"this",
"->",
"sortProcess",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"data",
"as",
"$",
"row",
")",
"{",
"$",
"this",
"->",
"next",
"(",
"$",
"row",
")",
";",
"}",
"unset",
"(",
... | Handle on input end
@return null | [
"Handle",
"on",
"input",
"end"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/Sort.php#L104-L111 |
koolphp/koolreport | src/widgets/koolphp/Table.php | Table.onInit | protected function onInit()
{
$this->useLanguage();
$this->useDataSource();
$this->useAutoName("ktable");
$this->emptyValue = Utility::get($this->params, "emptyValue", 0);
$this->clientEvents = Utility::get($this->params, "clientEvents");
$this->columns = Utility::get... | php | protected function onInit()
{
$this->useLanguage();
$this->useDataSource();
$this->useAutoName("ktable");
$this->emptyValue = Utility::get($this->params, "emptyValue", 0);
$this->clientEvents = Utility::get($this->params, "clientEvents");
$this->columns = Utility::get... | [
"protected",
"function",
"onInit",
"(",
")",
"{",
"$",
"this",
"->",
"useLanguage",
"(",
")",
";",
"$",
"this",
"->",
"useDataSource",
"(",
")",
";",
"$",
"this",
"->",
"useAutoName",
"(",
"\"ktable\"",
")",
";",
"$",
"this",
"->",
"emptyValue",
"=",
... | Handle the initation
@return null | [
"Handle",
"the",
"initation"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/widgets/koolphp/Table.php#L81-L172 |
koolphp/koolreport | src/widgets/koolphp/Table.php | Table.groupLevel | static function groupLevel(
$meta,
$groupModel,
$store,
&$result,
$level = 0,
$start = 0,
$previousParams = array()
) {
$keys = array_keys($groupModel);
$store->breakGroup(
$keys[$level],
function ($store, $localSta... | php | static function groupLevel(
$meta,
$groupModel,
$store,
&$result,
$level = 0,
$start = 0,
$previousParams = array()
) {
$keys = array_keys($groupModel);
$store->breakGroup(
$keys[$level],
function ($store, $localSta... | [
"static",
"function",
"groupLevel",
"(",
"$",
"meta",
",",
"$",
"groupModel",
",",
"$",
"store",
",",
"&",
"$",
"result",
",",
"$",
"level",
"=",
"0",
",",
"$",
"start",
"=",
"0",
",",
"$",
"previousParams",
"=",
"array",
"(",
")",
")",
"{",
"$",... | Group the level
@param array $meta The metadata
@param array $groupModel The group model
@param array $store The store
@param array $result The previous result
@param array $level The level
@param array $start The starting position
@param array $previousParams The previ... | [
"Group",
"the",
"level"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/widgets/koolphp/Table.php#L210-L293 |
koolphp/koolreport | src/widgets/koolphp/Table.php | Table.generateGroups | protected function generateGroups($meta)
{
if ($this->group) {
$result = array();
$sorts = array();
foreach ($this->group as $by => $settings) {
$sorts[$by] = Utility::get($settings, "sort", "asc");
}
$sorts = array_merge($sorts, $t... | php | protected function generateGroups($meta)
{
if ($this->group) {
$result = array();
$sorts = array();
foreach ($this->group as $by => $settings) {
$sorts[$by] = Utility::get($settings, "sort", "asc");
}
$sorts = array_merge($sorts, $t... | [
"protected",
"function",
"generateGroups",
"(",
"$",
"meta",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"group",
")",
"{",
"$",
"result",
"=",
"array",
"(",
")",
";",
"$",
"sorts",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"gro... | Generate groups for table grouping
@param array $meta The meta data of table
@return array List of results | [
"Generate",
"groups",
"for",
"table",
"grouping"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/widgets/koolphp/Table.php#L302-L316 |
koolphp/koolreport | src/widgets/koolphp/Table.php | Table.renderRowGroup | protected function renderRowGroup($groups, $index, $colspan)
{
if ($groups && isset($groups[$index])) {
foreach ($groups[$index] as $grow) {
if ($this->paging) {
$grow[3] = "display:none;" . $grow[3];
}
echo "<tr from='$grow[0]'... | php | protected function renderRowGroup($groups, $index, $colspan)
{
if ($groups && isset($groups[$index])) {
foreach ($groups[$index] as $grow) {
if ($this->paging) {
$grow[3] = "display:none;" . $grow[3];
}
echo "<tr from='$grow[0]'... | [
"protected",
"function",
"renderRowGroup",
"(",
"$",
"groups",
",",
"$",
"index",
",",
"$",
"colspan",
")",
"{",
"if",
"(",
"$",
"groups",
"&&",
"isset",
"(",
"$",
"groups",
"[",
"$",
"index",
"]",
")",
")",
"{",
"foreach",
"(",
"$",
"groups",
"[",... | Echo the row group content in html
@param array $groups The groups
@param integer $index The index of data rows
@param integer $colspan The number of colspan
@return null | [
"Echo",
"the",
"row",
"group",
"content",
"in",
"html"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/widgets/koolphp/Table.php#L327-L343 |
koolphp/koolreport | src/widgets/koolphp/Table.php | Table.onRender | public function onRender()
{
$meta = $this->dataStore->meta();
$showColumnKeys = array();
if ($this->columns == array()) {
if ($row = $this->dataStore[0]) {
$showColumnKeys = array_keys($row);
} else if (count($meta["columns"]) > 0) {
... | php | public function onRender()
{
$meta = $this->dataStore->meta();
$showColumnKeys = array();
if ($this->columns == array()) {
if ($row = $this->dataStore[0]) {
$showColumnKeys = array_keys($row);
} else if (count($meta["columns"]) > 0) {
... | [
"public",
"function",
"onRender",
"(",
")",
"{",
"$",
"meta",
"=",
"$",
"this",
"->",
"dataStore",
"->",
"meta",
"(",
")",
";",
"$",
"showColumnKeys",
"=",
"array",
"(",
")",
";",
"if",
"(",
"$",
"this",
"->",
"columns",
"==",
"array",
"(",
")",
... | Handle on widget rendering
@return null | [
"Handle",
"on",
"widget",
"rendering"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/widgets/koolphp/Table.php#L350-L424 |
koolphp/koolreport | src/clients/BootstrapCSS.php | BootstrapCSS.__constructBootstrapCSS | public function __constructBootstrapCSS()
{
$this->registerEvent(
'OnResourceInit',
function () {
$bootstrapAssetUrl = $this->getResourceManager()
->publishAssetFolder(realpath(dirname(__FILE__)."/bootstrap"));
$resources = array(
... | php | public function __constructBootstrapCSS()
{
$this->registerEvent(
'OnResourceInit',
function () {
$bootstrapAssetUrl = $this->getResourceManager()
->publishAssetFolder(realpath(dirname(__FILE__)."/bootstrap"));
$resources = array(
... | [
"public",
"function",
"__constructBootstrapCSS",
"(",
")",
"{",
"$",
"this",
"->",
"registerEvent",
"(",
"'OnResourceInit'",
",",
"function",
"(",
")",
"{",
"$",
"bootstrapAssetUrl",
"=",
"$",
"this",
"->",
"getResourceManager",
"(",
")",
"->",
"publishAssetFold... | Service construction
@return null | [
"Service",
"construction"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/clients/BootstrapCSS.php#L33-L51 |
koolphp/koolreport | src/datasources/ArrayDataSource.php | ArrayDataSource.load | public function load($data,$dataFormat=null)
{
if ($dataFormat) {
$this->dataFormat = $dataFormat;
}
$this->params["data"] = $data;
return $this;
} | php | public function load($data,$dataFormat=null)
{
if ($dataFormat) {
$this->dataFormat = $dataFormat;
}
$this->params["data"] = $data;
return $this;
} | [
"public",
"function",
"load",
"(",
"$",
"data",
",",
"$",
"dataFormat",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"dataFormat",
")",
"{",
"$",
"this",
"->",
"dataFormat",
"=",
"$",
"dataFormat",
";",
"}",
"$",
"this",
"->",
"params",
"[",
"\"data\"",
... | Load data
The data is loaded in form of "table" or "associate" of your choice
@param array $data Data
@param string $dataFormat Either "table" or "associate"
@return ArrayDataSource This datasource object | [
"Load",
"data"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/datasources/ArrayDataSource.php#L96-L103 |
koolphp/koolreport | src/datasources/ArrayDataSource.php | ArrayDataSource.start | public function start()
{
$data = Utility::get($this->params, "data", array());
if ($data && count($data)>0) {
switch($this->dataFormat)
{
case "table":
$columnNames = $data[0];
$metaData = array("columns"=>array());
... | php | public function start()
{
$data = Utility::get($this->params, "data", array());
if ($data && count($data)>0) {
switch($this->dataFormat)
{
case "table":
$columnNames = $data[0];
$metaData = array("columns"=>array());
... | [
"public",
"function",
"start",
"(",
")",
"{",
"$",
"data",
"=",
"Utility",
"::",
"get",
"(",
"$",
"this",
"->",
"params",
",",
"\"data\"",
",",
"array",
"(",
")",
")",
";",
"if",
"(",
"$",
"data",
"&&",
"count",
"(",
"$",
"data",
")",
">",
"0",... | Start piping data
@return null | [
"Start",
"piping",
"data"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/datasources/ArrayDataSource.php#L110-L149 |
koolphp/koolreport | src/processes/CalculatedColumn.php | CalculatedColumn.onInit | protected function onInit()
{
$params = array();
foreach ($this->params as $cKey=>$cValue) {
switch(gettype($cValue))
{
case "string":
case "number":
case "object":
$params[$cKey] = array(
"exp"=>$cValue,... | php | protected function onInit()
{
$params = array();
foreach ($this->params as $cKey=>$cValue) {
switch(gettype($cValue))
{
case "string":
case "number":
case "object":
$params[$cKey] = array(
"exp"=>$cValue,... | [
"protected",
"function",
"onInit",
"(",
")",
"{",
"$",
"params",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"params",
"as",
"$",
"cKey",
"=>",
"$",
"cValue",
")",
"{",
"switch",
"(",
"gettype",
"(",
"$",
"cValue",
")",
")",
"... | Process initiation
@return null | [
"Process",
"initiation"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/CalculatedColumn.php#L66-L92 |
koolphp/koolreport | src/processes/CalculatedColumn.php | CalculatedColumn.onMetaReceived | protected function onMetaReceived($metaData)
{
foreach ($this->params as $cKey=>$cValue) {
unset($cValue["exp"]);
$metaData["columns"][$cKey] = $cValue;
}
return $metaData;
} | php | protected function onMetaReceived($metaData)
{
foreach ($this->params as $cKey=>$cValue) {
unset($cValue["exp"]);
$metaData["columns"][$cKey] = $cValue;
}
return $metaData;
} | [
"protected",
"function",
"onMetaReceived",
"(",
"$",
"metaData",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"params",
"as",
"$",
"cKey",
"=>",
"$",
"cValue",
")",
"{",
"unset",
"(",
"$",
"cValue",
"[",
"\"exp\"",
"]",
")",
";",
"$",
"metaData",
"["... | Handle on meta received
@param array $metaData The meta data
@return array New meta data | [
"Handle",
"on",
"meta",
"received"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/CalculatedColumn.php#L101-L108 |
koolphp/koolreport | src/processes/CalculatedColumn.php | CalculatedColumn.onInput | protected function onInput($data)
{
// print_r($data);
$this->rowNum++;
foreach ($this->params as $cKey=>$cValue) {
switch(gettype($cValue["exp"]))
{
case "string":
$expression = $cValue["exp"];
// echo $expression . ' || ';... | php | protected function onInput($data)
{
// print_r($data);
$this->rowNum++;
foreach ($this->params as $cKey=>$cValue) {
switch(gettype($cValue["exp"]))
{
case "string":
$expression = $cValue["exp"];
// echo $expression . ' || ';... | [
"protected",
"function",
"onInput",
"(",
"$",
"data",
")",
"{",
"// print_r($data);",
"$",
"this",
"->",
"rowNum",
"++",
";",
"foreach",
"(",
"$",
"this",
"->",
"params",
"as",
"$",
"cKey",
"=>",
"$",
"cValue",
")",
"{",
"switch",
"(",
"gettype",
"(",
... | Handle on data input
@param array $data The row data
@return null | [
"Handle",
"on",
"data",
"input"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/CalculatedColumn.php#L117-L145 |
koolphp/koolreport | src/processes/Map.php | Map.onInit | public function onInit()
{
$func = Util::get($this->params, '{init}', null);
if (is_callable($func)) {
$this->mapState = $func($data);
}
} | php | public function onInit()
{
$func = Util::get($this->params, '{init}', null);
if (is_callable($func)) {
$this->mapState = $func($data);
}
} | [
"public",
"function",
"onInit",
"(",
")",
"{",
"$",
"func",
"=",
"Util",
"::",
"get",
"(",
"$",
"this",
"->",
"params",
",",
"'{init}'",
",",
"null",
")",
";",
"if",
"(",
"is_callable",
"(",
"$",
"func",
")",
")",
"{",
"$",
"this",
"->",
"mapStat... | Handle on initiation
@return null | [
"Handle",
"on",
"initiation"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/Map.php#L64-L70 |
koolphp/koolreport | src/processes/Map.php | Map.receiveMeta | public function receiveMeta($metaData, $source)
{
$this->streamingSource = $source;
$this->newMeta = $this->metaData = $metaData;
$func = Util::get($this->params, '{meta}', null);
if (is_callable($func)) {
$this->newMeta = $func($metaData);
}
} | php | public function receiveMeta($metaData, $source)
{
$this->streamingSource = $source;
$this->newMeta = $this->metaData = $metaData;
$func = Util::get($this->params, '{meta}', null);
if (is_callable($func)) {
$this->newMeta = $func($metaData);
}
} | [
"public",
"function",
"receiveMeta",
"(",
"$",
"metaData",
",",
"$",
"source",
")",
"{",
"$",
"this",
"->",
"streamingSource",
"=",
"$",
"source",
";",
"$",
"this",
"->",
"newMeta",
"=",
"$",
"this",
"->",
"metaData",
"=",
"$",
"metaData",
";",
"$",
... | Handle on data recieved
@param array $metaData Metadata received
@param Node $source The source sending data
@return null | [
"Handle",
"on",
"data",
"recieved"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/Map.php#L80-L88 |
koolphp/koolreport | src/processes/Map.php | Map.to2DArray | protected function to2DArray($arr)
{
if (empty($arr) || !is_array($arr)) {
return [];
}
if (count($arr) == count($arr, COUNT_RECURSIVE)) {
return [$arr];
}
return $arr;
} | php | protected function to2DArray($arr)
{
if (empty($arr) || !is_array($arr)) {
return [];
}
if (count($arr) == count($arr, COUNT_RECURSIVE)) {
return [$arr];
}
return $arr;
} | [
"protected",
"function",
"to2DArray",
"(",
"$",
"arr",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"arr",
")",
"||",
"!",
"is_array",
"(",
"$",
"arr",
")",
")",
"{",
"return",
"[",
"]",
";",
"}",
"if",
"(",
"count",
"(",
"$",
"arr",
")",
"==",
"c... | Convert to 2D array
@param array $arr The array
@return array The coverted array | [
"Convert",
"to",
"2D",
"array"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/Map.php#L125-L134 |
koolphp/koolreport | src/processes/Map.php | Map.onInput | protected function onInput($row)
{
$func = Util::get($this->params, '{value}', null);
if (is_callable($func)) {
$return = $func(
$row,
$this->metaData,
$this->index,
$this->mapState
);
if (is_array(... | php | protected function onInput($row)
{
$func = Util::get($this->params, '{value}', null);
if (is_callable($func)) {
$return = $func(
$row,
$this->metaData,
$this->index,
$this->mapState
);
if (is_array(... | [
"protected",
"function",
"onInput",
"(",
"$",
"row",
")",
"{",
"$",
"func",
"=",
"Util",
"::",
"get",
"(",
"$",
"this",
"->",
"params",
",",
"'{value}'",
",",
"null",
")",
";",
"if",
"(",
"is_callable",
"(",
"$",
"func",
")",
")",
"{",
"$",
"retu... | Handle on data input
@param array $row The input data row
@return null | [
"Handle",
"on",
"data",
"input"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/Map.php#L143-L187 |
koolphp/koolreport | src/processes/Map.php | Map.endInput | public function endInput($source)
{
if (!$this->metaSent) {
$this->sendMeta($this->newMeta);
}
$func = Util::get($this->params, '{end}', null);
if (is_callable($func)) {
$newRows = $func($this->index, $this->mapState);
$newRows = $this->to2DArray($... | php | public function endInput($source)
{
if (!$this->metaSent) {
$this->sendMeta($this->newMeta);
}
$func = Util::get($this->params, '{end}', null);
if (is_callable($func)) {
$newRows = $func($this->index, $this->mapState);
$newRows = $this->to2DArray($... | [
"public",
"function",
"endInput",
"(",
"$",
"source",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"metaSent",
")",
"{",
"$",
"this",
"->",
"sendMeta",
"(",
"$",
"this",
"->",
"newMeta",
")",
";",
"}",
"$",
"func",
"=",
"Util",
"::",
"get",
"(",
... | Handle on input end
@param Node $source The source sending
@return null | [
"Handle",
"on",
"input",
"end"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/Map.php#L196-L210 |
koolphp/koolreport | src/processes/Transpose.php | Transpose.onInputEnd | protected function onInputEnd()
{
//Send meta
$countRow = count($this->data);
$newMeta = array(
"columns" => array(),
);
for ($i = 0; $i <= $countRow; $i++) {
$newMeta["columns"]["c$i"] = array("type" => "unknown");
}
$newMeta["columns"... | php | protected function onInputEnd()
{
//Send meta
$countRow = count($this->data);
$newMeta = array(
"columns" => array(),
);
for ($i = 0; $i <= $countRow; $i++) {
$newMeta["columns"]["c$i"] = array("type" => "unknown");
}
$newMeta["columns"... | [
"protected",
"function",
"onInputEnd",
"(",
")",
"{",
"//Send meta",
"$",
"countRow",
"=",
"count",
"(",
"$",
"this",
"->",
"data",
")",
";",
"$",
"newMeta",
"=",
"array",
"(",
"\"columns\"",
"=>",
"array",
"(",
")",
",",
")",
";",
"for",
"(",
"$",
... | Handle on data input end
@return null | [
"Handle",
"on",
"data",
"input",
"end"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/Transpose.php#L81-L107 |
koolphp/koolreport | src/processes/NumberBucket.php | NumberBucket.onMetaReceived | protected function onMetaReceived($metaData)
{
foreach ($this->params as $cName => $cParam) {
$metaData["columns"][$cName] = array(
"type" => "string",
);
$this->params[$cName]["formatString"] = Utility::get($cParam, "formatString", "{from} - {to}");
... | php | protected function onMetaReceived($metaData)
{
foreach ($this->params as $cName => $cParam) {
$metaData["columns"][$cName] = array(
"type" => "string",
);
$this->params[$cName]["formatString"] = Utility::get($cParam, "formatString", "{from} - {to}");
... | [
"protected",
"function",
"onMetaReceived",
"(",
"$",
"metaData",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"params",
"as",
"$",
"cName",
"=>",
"$",
"cParam",
")",
"{",
"$",
"metaData",
"[",
"\"columns\"",
"]",
"[",
"$",
"cName",
"]",
"=",
"array",
... | Handle on meta received
@param array $metaData The meta data
@return array New meta data | [
"Handle",
"on",
"meta",
"received"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/NumberBucket.php#L52-L66 |
koolphp/koolreport | src/processes/NumberBucket.php | NumberBucket.onInput | protected function onInput($data)
{
//Process data here
foreach ($this->params as $cName => $cParam) {
$numberFormat = array_merge($cParam, array("type" => "number"));
//print_r($numberFormat);
$from = Utility::format(floor($data[$cName] / $cParam["step"]) * $cPar... | php | protected function onInput($data)
{
//Process data here
foreach ($this->params as $cName => $cParam) {
$numberFormat = array_merge($cParam, array("type" => "number"));
//print_r($numberFormat);
$from = Utility::format(floor($data[$cName] / $cParam["step"]) * $cPar... | [
"protected",
"function",
"onInput",
"(",
"$",
"data",
")",
"{",
"//Process data here",
"foreach",
"(",
"$",
"this",
"->",
"params",
"as",
"$",
"cName",
"=>",
"$",
"cParam",
")",
"{",
"$",
"numberFormat",
"=",
"array_merge",
"(",
"$",
"cParam",
",",
"arra... | Handle on data input
@param array $data The input data row
@return null | [
"Handle",
"on",
"data",
"input"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/NumberBucket.php#L75-L93 |
koolphp/koolreport | src/processes/StringCase.php | StringCase.onInit | protected function onInit()
{
foreach ($this->params as $key => $value) {
$columnList = explode(",", $value);
foreach ($columnList as $k => $v) {
$columnList[$k] = trim($v);
}
$this->params[$key] = $columnList;
}
} | php | protected function onInit()
{
foreach ($this->params as $key => $value) {
$columnList = explode(",", $value);
foreach ($columnList as $k => $v) {
$columnList[$k] = trim($v);
}
$this->params[$key] = $columnList;
}
} | [
"protected",
"function",
"onInit",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"params",
"as",
"$",
"key",
"=>",
"$",
"value",
")",
"{",
"$",
"columnList",
"=",
"explode",
"(",
"\",\"",
",",
"$",
"value",
")",
";",
"foreach",
"(",
"$",
"colum... | Handle on initiation
@return null | [
"Handle",
"on",
"initiation"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/StringCase.php#L44-L53 |
koolphp/koolreport | src/processes/StringCase.php | StringCase.onInput | protected function onInput($data)
{
//Process data here
foreach ($this->params as $func => $columns) {
switch ($func) {
case "upper":
foreach ($columns as $col) {
$data[$col] = strtoupper($data[$col]);
}
brea... | php | protected function onInput($data)
{
//Process data here
foreach ($this->params as $func => $columns) {
switch ($func) {
case "upper":
foreach ($columns as $col) {
$data[$col] = strtoupper($data[$col]);
}
brea... | [
"protected",
"function",
"onInput",
"(",
"$",
"data",
")",
"{",
"//Process data here",
"foreach",
"(",
"$",
"this",
"->",
"params",
"as",
"$",
"func",
"=>",
"$",
"columns",
")",
"{",
"switch",
"(",
"$",
"func",
")",
"{",
"case",
"\"upper\"",
":",
"fore... | Handle on data input
@param array $data The input data row
@return null | [
"Handle",
"on",
"data",
"input"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/StringCase.php#L62-L90 |
koolphp/koolreport | src/processes/RemoveColumn.php | RemoveColumn.onInput | protected function onInput($data)
{
//Process data here
foreach ($this->params as $column) {
unset($data[$column]);
}
$this->next($data);
} | php | protected function onInput($data)
{
//Process data here
foreach ($this->params as $column) {
unset($data[$column]);
}
$this->next($data);
} | [
"protected",
"function",
"onInput",
"(",
"$",
"data",
")",
"{",
"//Process data here",
"foreach",
"(",
"$",
"this",
"->",
"params",
"as",
"$",
"column",
")",
"{",
"unset",
"(",
"$",
"data",
"[",
"$",
"column",
"]",
")",
";",
"}",
"$",
"this",
"->",
... | Handle on data input
@param array $data The input data row
@return null | [
"Handle",
"on",
"data",
"input"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/RemoveColumn.php#L59-L66 |
koolphp/koolreport | src/datasources/SQLSRVDataSource.php | SQLSRVDataSource.onInit | protected function onInit()
{
$host = Util::get($this->params, "host", "");//host\instanceName
$username = Util::get($this->params, "username", "");
$password = Util::get($this->params, "password", "");
$dbname = Util::get($this->params, "dbname", "");
$returnDatesAsStrings =... | php | protected function onInit()
{
$host = Util::get($this->params, "host", "");//host\instanceName
$username = Util::get($this->params, "username", "");
$password = Util::get($this->params, "password", "");
$dbname = Util::get($this->params, "dbname", "");
$returnDatesAsStrings =... | [
"protected",
"function",
"onInit",
"(",
")",
"{",
"$",
"host",
"=",
"Util",
"::",
"get",
"(",
"$",
"this",
"->",
"params",
",",
"\"host\"",
",",
"\"\"",
")",
";",
"//host\\instanceName",
"$",
"username",
"=",
"Util",
"::",
"get",
"(",
"$",
"this",
"-... | Datasource initiation
@return null | [
"Datasource",
"initiation"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/datasources/SQLSRVDataSource.php#L97-L128 |
koolphp/koolreport | src/datasources/SQLSRVDataSource.php | SQLSRVDataSource.escape | protected function escape($str)
{
if (is_string($str) OR (is_object($str) && method_exists($str, '__toString'))) {
return "'".$this->escapeStr($str)."'";
} elseif (is_bool($str)) {
return ($str === false) ? 0 : 1;
} elseif ($str === null) {
return 'NULL';
... | php | protected function escape($str)
{
if (is_string($str) OR (is_object($str) && method_exists($str, '__toString'))) {
return "'".$this->escapeStr($str)."'";
} elseif (is_bool($str)) {
return ($str === false) ? 0 : 1;
} elseif ($str === null) {
return 'NULL';
... | [
"protected",
"function",
"escape",
"(",
"$",
"str",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"str",
")",
"OR",
"(",
"is_object",
"(",
"$",
"str",
")",
"&&",
"method_exists",
"(",
"$",
"str",
",",
"'__toString'",
")",
")",
")",
"{",
"return",
"\"... | Escape value for SQL safe
@param string $str The string need to be escape
@return null | [
"Escape",
"value",
"for",
"SQL",
"safe"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/datasources/SQLSRVDataSource.php#L250-L260 |
koolphp/koolreport | src/datasources/SQLSRVDataSource.php | SQLSRVDataSource.start | public function start()
{
// echo "query=" . $this->query . '<br>';
$metaData = array("columns"=>array());
if ($this->countTotal) {
$query = $this->bindParams($this->totalQuery, $this->sqlParams);
$stmt = sqlsrv_query($this->connection, $query);
if ($stmt... | php | public function start()
{
// echo "query=" . $this->query . '<br>';
$metaData = array("columns"=>array());
if ($this->countTotal) {
$query = $this->bindParams($this->totalQuery, $this->sqlParams);
$stmt = sqlsrv_query($this->connection, $query);
if ($stmt... | [
"public",
"function",
"start",
"(",
")",
"{",
"// echo \"query=\" . $this->query . '<br>';",
"$",
"metaData",
"=",
"array",
"(",
"\"columns\"",
"=>",
"array",
"(",
")",
")",
";",
"if",
"(",
"$",
"this",
"->",
"countTotal",
")",
"{",
"$",
"query",
"=",
"$",... | Start piping data
@return null | [
"Start",
"piping",
"data"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/datasources/SQLSRVDataSource.php#L319-L380 |
koolphp/koolreport | src/core/SubReport.php | SubReport.__constructSubReport | public function __constructSubReport()
{
$this->registerEvent(
"OnInit",
function () {
$params = array_merge($this->params, $_POST);
if (isset($params["@subReport"])) {
$name = $params["@subReport"];
unset($param... | php | public function __constructSubReport()
{
$this->registerEvent(
"OnInit",
function () {
$params = array_merge($this->params, $_POST);
if (isset($params["@subReport"])) {
$name = $params["@subReport"];
unset($param... | [
"public",
"function",
"__constructSubReport",
"(",
")",
"{",
"$",
"this",
"->",
"registerEvent",
"(",
"\"OnInit\"",
",",
"function",
"(",
")",
"{",
"$",
"params",
"=",
"array_merge",
"(",
"$",
"this",
"->",
"params",
",",
"$",
"_POST",
")",
";",
"if",
... | Initiate sub report
@return null | [
"Initiate",
"sub",
"report"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/SubReport.php#L32-L67 |
koolphp/koolreport | src/core/SubReport.php | SubReport.subReport | public function subReport($name,$params=array())
{
$subReports = Utility::get($this->reportSettings, "subReports");
$class = Utility::get($subReports, $name);
if ($class!=null) {
$params["@reportName"] = $name;
$r = new $class($params);
echo "<sub-report i... | php | public function subReport($name,$params=array())
{
$subReports = Utility::get($this->reportSettings, "subReports");
$class = Utility::get($subReports, $name);
if ($class!=null) {
$params["@reportName"] = $name;
$r = new $class($params);
echo "<sub-report i... | [
"public",
"function",
"subReport",
"(",
"$",
"name",
",",
"$",
"params",
"=",
"array",
"(",
")",
")",
"{",
"$",
"subReports",
"=",
"Utility",
"::",
"get",
"(",
"$",
"this",
"->",
"reportSettings",
",",
"\"subReports\"",
")",
";",
"$",
"class",
"=",
"... | Render a sub report inside report
@param string $name The name of subrepor that defined in report settings
@param array $params Parameters that you want to send to sub report
@return null | [
"Render",
"a",
"sub",
"report",
"inside",
"report"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/SubReport.php#L77-L96 |
koolphp/koolreport | src/widgets/google/DonutChart.php | DonutChart.onInit | protected function onInit()
{
parent::onInit();
$this->type = "PieChart";
if (!isset($this->options["pieHole"])) {
$this->options["pieHole"] = 0.4;
}
} | php | protected function onInit()
{
parent::onInit();
$this->type = "PieChart";
if (!isset($this->options["pieHole"])) {
$this->options["pieHole"] = 0.4;
}
} | [
"protected",
"function",
"onInit",
"(",
")",
"{",
"parent",
"::",
"onInit",
"(",
")",
";",
"$",
"this",
"->",
"type",
"=",
"\"PieChart\"",
";",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"options",
"[",
"\"pieHole\"",
"]",
")",
")",
"{",
"$",... | Handle on widget init
@return null | [
"Handle",
"on",
"widget",
"init"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/widgets/google/DonutChart.php#L32-L39 |
koolphp/koolreport | src/widgets/google/ComboChart.php | ComboChart.onInit | protected function onInit()
{
parent::onInit();
$series_option = Utility::get($this->options, "series", array());
$columns = parent::getColumnSettings();
$cKeys = array_keys($columns);
foreach ($cKeys as $i => $cKey) {
if ($i > 0) {
$chartType = ... | php | protected function onInit()
{
parent::onInit();
$series_option = Utility::get($this->options, "series", array());
$columns = parent::getColumnSettings();
$cKeys = array_keys($columns);
foreach ($cKeys as $i => $cKey) {
if ($i > 0) {
$chartType = ... | [
"protected",
"function",
"onInit",
"(",
")",
"{",
"parent",
"::",
"onInit",
"(",
")",
";",
"$",
"series_option",
"=",
"Utility",
"::",
"get",
"(",
"$",
"this",
"->",
"options",
",",
"\"series\"",
",",
"array",
"(",
")",
")",
";",
"$",
"columns",
"=",... | Handle on widget init
@return null | [
"Handle",
"on",
"widget",
"init"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/widgets/google/ComboChart.php#L34-L55 |
koolphp/koolreport | src/processes/Custom.php | Custom.onInput | protected function onInput($data)
{
$func = $this->params;
$data = $func($data);
if ($data) {
$this->next($data);
}
} | php | protected function onInput($data)
{
$func = $this->params;
$data = $func($data);
if ($data) {
$this->next($data);
}
} | [
"protected",
"function",
"onInput",
"(",
"$",
"data",
")",
"{",
"$",
"func",
"=",
"$",
"this",
"->",
"params",
";",
"$",
"data",
"=",
"$",
"func",
"(",
"$",
"data",
")",
";",
"if",
"(",
"$",
"data",
")",
"{",
"$",
"this",
"->",
"next",
"(",
"... | Handle on data input
@param array $data The input data row
@return null | [
"Handle",
"on",
"data",
"input"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/Custom.php#L37-L45 |
koolphp/koolreport | src/processes/Group.php | Group.parseGroups | protected function parseGroups($params)
{
if ($params == null) {
return array();
}
if (is_array($params)) {
return $params;
}
if (is_string($params)) {
$list = explode(",", $params);
foreach ($list as &$item) {
... | php | protected function parseGroups($params)
{
if ($params == null) {
return array();
}
if (is_array($params)) {
return $params;
}
if (is_string($params)) {
$list = explode(",", $params);
foreach ($list as &$item) {
... | [
"protected",
"function",
"parseGroups",
"(",
"$",
"params",
")",
"{",
"if",
"(",
"$",
"params",
"==",
"null",
")",
"{",
"return",
"array",
"(",
")",
";",
"}",
"if",
"(",
"is_array",
"(",
"$",
"params",
")",
")",
"{",
"return",
"$",
"params",
";",
... | Parse group
@param array $params List of params
@return array Parsed group | [
"Parse",
"group"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/Group.php#L56-L74 |
koolphp/koolreport | src/processes/Group.php | Group.onInit | protected function onInit()
{
$this->groupColumns = $this->parseGroups(Utility::get($this->params, "by"));
$this->sumColumns = $this->parseGroups(Utility::get($this->params, "sum"));
$this->countColumns = $this->parseGroups(Utility::get($this->params, "count"));
$this->avgColumns = $... | php | protected function onInit()
{
$this->groupColumns = $this->parseGroups(Utility::get($this->params, "by"));
$this->sumColumns = $this->parseGroups(Utility::get($this->params, "sum"));
$this->countColumns = $this->parseGroups(Utility::get($this->params, "count"));
$this->avgColumns = $... | [
"protected",
"function",
"onInit",
"(",
")",
"{",
"$",
"this",
"->",
"groupColumns",
"=",
"$",
"this",
"->",
"parseGroups",
"(",
"Utility",
"::",
"get",
"(",
"$",
"this",
"->",
"params",
",",
"\"by\"",
")",
")",
";",
"$",
"this",
"->",
"sumColumns",
... | Handle on initiation
@return null | [
"Handle",
"on",
"initiation"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/Group.php#L81-L93 |
koolphp/koolreport | src/processes/Group.php | Group.onMetaReceived | protected function onMetaReceived($metaData)
{
foreach ($this->groupColumns as $column) {
$metaData["columns"][$column]["method"] = "group";
}
foreach ($this->sumColumns as $column) {
$metaData["columns"][$column]["method"] = "sum";
}
foreach ($this->... | php | protected function onMetaReceived($metaData)
{
foreach ($this->groupColumns as $column) {
$metaData["columns"][$column]["method"] = "group";
}
foreach ($this->sumColumns as $column) {
$metaData["columns"][$column]["method"] = "sum";
}
foreach ($this->... | [
"protected",
"function",
"onMetaReceived",
"(",
"$",
"metaData",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"groupColumns",
"as",
"$",
"column",
")",
"{",
"$",
"metaData",
"[",
"\"columns\"",
"]",
"[",
"$",
"column",
"]",
"[",
"\"method\"",
"]",
"=",
... | Handle on meta received
@param array $metaData The meta data
@return array New meta data | [
"Handle",
"on",
"meta",
"received"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/Group.php#L102-L126 |
koolphp/koolreport | src/processes/Group.php | Group.onInput | protected function onInput($row)
{
$index = "";
foreach ($this->groupColumns as $gColumn) {
$index .= $row[$gColumn];
}
$index = strtolower($index) . md5($index);
if (isset($this->gData[$index])) {
$res = $this->gData[$index];
$this->cData[... | php | protected function onInput($row)
{
$index = "";
foreach ($this->groupColumns as $gColumn) {
$index .= $row[$gColumn];
}
$index = strtolower($index) . md5($index);
if (isset($this->gData[$index])) {
$res = $this->gData[$index];
$this->cData[... | [
"protected",
"function",
"onInput",
"(",
"$",
"row",
")",
"{",
"$",
"index",
"=",
"\"\"",
";",
"foreach",
"(",
"$",
"this",
"->",
"groupColumns",
"as",
"$",
"gColumn",
")",
"{",
"$",
"index",
".=",
"$",
"row",
"[",
"$",
"gColumn",
"]",
";",
"}",
... | Handle on data input
@param array $row The input row
@return null | [
"Handle",
"on",
"data",
"input"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/Group.php#L135-L176 |
koolphp/koolreport | src/processes/Group.php | Group.onInputEnd | protected function onInputEnd()
{
if ($this->sort) {
ksort($this->gData, SORT_STRING);
}
foreach ($this->gData as $index => $data) {
$this->next($data);
}
} | php | protected function onInputEnd()
{
if ($this->sort) {
ksort($this->gData, SORT_STRING);
}
foreach ($this->gData as $index => $data) {
$this->next($data);
}
} | [
"protected",
"function",
"onInputEnd",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"sort",
")",
"{",
"ksort",
"(",
"$",
"this",
"->",
"gData",
",",
"SORT_STRING",
")",
";",
"}",
"foreach",
"(",
"$",
"this",
"->",
"gData",
"as",
"$",
"index",
"=>",... | Handle on input end
@return null | [
"Handle",
"on",
"input",
"end"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/Group.php#L183-L191 |
koolphp/koolreport | src/datasources/OracleDataSource.php | OracleDataSource.onInit | protected function onInit()
{
$username = Util::get($this->params, "username", "");
$password = Util::get($this->params, "password", "");
$connString = Util::get($this->params, "connectionString", "");
$key = md5($username.$password.$connString);
if (isset(OracleDataSource:... | php | protected function onInit()
{
$username = Util::get($this->params, "username", "");
$password = Util::get($this->params, "password", "");
$connString = Util::get($this->params, "connectionString", "");
$key = md5($username.$password.$connString);
if (isset(OracleDataSource:... | [
"protected",
"function",
"onInit",
"(",
")",
"{",
"$",
"username",
"=",
"Util",
"::",
"get",
"(",
"$",
"this",
"->",
"params",
",",
"\"username\"",
",",
"\"\"",
")",
";",
"$",
"password",
"=",
"Util",
"::",
"get",
"(",
"$",
"this",
"->",
"params",
... | Called for initiation
@return null | [
"Called",
"for",
"initiation"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/datasources/OracleDataSource.php#L110-L129 |
koolphp/koolreport | src/datasources/OracleDataSource.php | OracleDataSource.processQuery | static function processQuery($query, $queryParams)
{
$search = Util::get($queryParams, 'search', '1=1');
$searchSql = "WHERE $search";
$order = Util::get($queryParams, 'order', '');
$orderSql = ! empty($order) ? "ORDER BY $order" : "";
$start = (int) Util::get(... | php | static function processQuery($query, $queryParams)
{
$search = Util::get($queryParams, 'search', '1=1');
$searchSql = "WHERE $search";
$order = Util::get($queryParams, 'order', '');
$orderSql = ! empty($order) ? "ORDER BY $order" : "";
$start = (int) Util::get(... | [
"static",
"function",
"processQuery",
"(",
"$",
"query",
",",
"$",
"queryParams",
")",
"{",
"$",
"search",
"=",
"Util",
"::",
"get",
"(",
"$",
"queryParams",
",",
"'search'",
",",
"'1=1'",
")",
";",
"$",
"searchSql",
"=",
"\"WHERE $search\"",
";",
"$",
... | Process query to additional condition
@param string $query The SQL query statement
@param array $queryParams The parameters of SQL query
@return array Information of additional condition | [
"Process",
"query",
"to",
"additional",
"condition"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/datasources/OracleDataSource.php#L156-L179 |
koolphp/koolreport | src/datasources/OracleDataSource.php | OracleDataSource.mapFieldTypeToBindType | protected function mapFieldTypeToBindType($native_type)
{
$oracleDatatypeMap = array(
'varchar2' => 'string',
'nvarchar2' => 'string',
'number' => 'number',
'long' => 'number',
'date' => 'datetime',
'binary_float' => 'number',
... | php | protected function mapFieldTypeToBindType($native_type)
{
$oracleDatatypeMap = array(
'varchar2' => 'string',
'nvarchar2' => 'string',
'number' => 'number',
'long' => 'number',
'date' => 'datetime',
'binary_float' => 'number',
... | [
"protected",
"function",
"mapFieldTypeToBindType",
"(",
"$",
"native_type",
")",
"{",
"$",
"oracleDatatypeMap",
"=",
"array",
"(",
"'varchar2'",
"=>",
"'string'",
",",
"'nvarchar2'",
"=>",
"'string'",
",",
"'number'",
"=>",
"'number'",
",",
"'long'",
"=>",
"'num... | Map field type to bind type
@param string $native_type The type of field
@return string KoolReport type of field | [
"Map",
"field",
"type",
"to",
"bind",
"type"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/datasources/OracleDataSource.php#L287-L318 |
koolphp/koolreport | src/datasources/OracleDataSource.php | OracleDataSource.start | public function start()
{
$metaData = array("columns"=>array());
if ($this->countTotal) {
$totalQuery = $this->bindParams($this->totalQuery, $this->sqlParams);
$totalResult = oci_parse($this->connection, $totalQuery);
if (! $totalResult) {
echo oc... | php | public function start()
{
$metaData = array("columns"=>array());
if ($this->countTotal) {
$totalQuery = $this->bindParams($this->totalQuery, $this->sqlParams);
$totalResult = oci_parse($this->connection, $totalQuery);
if (! $totalResult) {
echo oc... | [
"public",
"function",
"start",
"(",
")",
"{",
"$",
"metaData",
"=",
"array",
"(",
"\"columns\"",
"=>",
"array",
"(",
")",
")",
";",
"if",
"(",
"$",
"this",
"->",
"countTotal",
")",
"{",
"$",
"totalQuery",
"=",
"$",
"this",
"->",
"bindParams",
"(",
... | Start piping data
@return null | [
"Start",
"piping",
"data"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/datasources/OracleDataSource.php#L325-L391 |
koolphp/koolreport | src/clients/Bootstrap.php | Bootstrap.__constructBootstrap | public function __constructBootstrap()
{
$this->registerEvent(
'OnResourceInit',
function () {
$bootstrapAssetUrl = $this->getResourceManager()
->publishAssetFolder(realpath(dirname(__FILE__)."/bootstrap"));
$jqueryAssetUrl = $this-... | php | public function __constructBootstrap()
{
$this->registerEvent(
'OnResourceInit',
function () {
$bootstrapAssetUrl = $this->getResourceManager()
->publishAssetFolder(realpath(dirname(__FILE__)."/bootstrap"));
$jqueryAssetUrl = $this-... | [
"public",
"function",
"__constructBootstrap",
"(",
")",
"{",
"$",
"this",
"->",
"registerEvent",
"(",
"'OnResourceInit'",
",",
"function",
"(",
")",
"{",
"$",
"bootstrapAssetUrl",
"=",
"$",
"this",
"->",
"getResourceManager",
"(",
")",
"->",
"publishAssetFolder"... | Service construction
@return null | [
"Service",
"construction"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/clients/Bootstrap.php#L34-L59 |
koolphp/koolreport | src/processes/Filter.php | Filter.isFiltered | public function isFiltered($condition, $value, $type)
{
$isFiltered = true;
switch ($condition[1]) {
case '=':
case '==':
case 'equal':
if ($type === 'string' && is_string($value) && is_string($condition[2])) {
$isFiltered = strcmp($value, $conditi... | php | public function isFiltered($condition, $value, $type)
{
$isFiltered = true;
switch ($condition[1]) {
case '=':
case '==':
case 'equal':
if ($type === 'string' && is_string($value) && is_string($condition[2])) {
$isFiltered = strcmp($value, $conditi... | [
"public",
"function",
"isFiltered",
"(",
"$",
"condition",
",",
"$",
"value",
",",
"$",
"type",
")",
"{",
"$",
"isFiltered",
"=",
"true",
";",
"switch",
"(",
"$",
"condition",
"[",
"1",
"]",
")",
"{",
"case",
"'='",
":",
"case",
"'=='",
":",
"case"... | Return true if result is filtered
@param array $condition Condition
@param mixed $value The value
@param string $type The type of value
@return bool Whether result is filtered | [
"Return",
"true",
"if",
"result",
"is",
"filtered"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/Filter.php#L60-L165 |
koolphp/koolreport | src/processes/Filter.php | Filter.onInput | protected function onInput($data)
{
$columnsMeta = $this->metaData['columns'];
$filters = $this->filters;
$logicalOperator = 'and';
$isFiltered = true;
foreach ($filters as $i => $filter) {
if (is_array($filter)) {
$field = $filter[0];
... | php | protected function onInput($data)
{
$columnsMeta = $this->metaData['columns'];
$filters = $this->filters;
$logicalOperator = 'and';
$isFiltered = true;
foreach ($filters as $i => $filter) {
if (is_array($filter)) {
$field = $filter[0];
... | [
"protected",
"function",
"onInput",
"(",
"$",
"data",
")",
"{",
"$",
"columnsMeta",
"=",
"$",
"this",
"->",
"metaData",
"[",
"'columns'",
"]",
";",
"$",
"filters",
"=",
"$",
"this",
"->",
"filters",
";",
"$",
"logicalOperator",
"=",
"'and'",
";",
"$",
... | Handle on data input
@param array $data The input data row
@return null | [
"Handle",
"on",
"data",
"input"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/Filter.php#L174-L206 |
koolphp/koolreport | src/core/Theme.php | Theme.colorScheme | public function colorScheme($key=null)
{
$all = $this->allColorSchemes();
$allKeys = array_keys($all);
if (count($allKeys)>0) {
if ($key && isset($all[strtolower($key)])) {
return $all[strtolower($key)];
}
return $all[$allKeys[0]];
... | php | public function colorScheme($key=null)
{
$all = $this->allColorSchemes();
$allKeys = array_keys($all);
if (count($allKeys)>0) {
if ($key && isset($all[strtolower($key)])) {
return $all[strtolower($key)];
}
return $all[$allKeys[0]];
... | [
"public",
"function",
"colorScheme",
"(",
"$",
"key",
"=",
"null",
")",
"{",
"$",
"all",
"=",
"$",
"this",
"->",
"allColorSchemes",
"(",
")",
";",
"$",
"allKeys",
"=",
"array_keys",
"(",
"$",
"all",
")",
";",
"if",
"(",
"count",
"(",
"$",
"allKeys"... | Get color scheme
@param string $key Name of color scheme we want to get, if null the first color scheme will be return.
@return array Array of colors, null if there is no available | [
"Get",
"color",
"scheme"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/Theme.php#L108-L119 |
koolphp/koolreport | src/core/Theme.php | Theme.doesSupport | public function doesSupport($widget)
{
if (gettype($widget)!="string") {
$widget = get_class($widget);
}
return isset($this->themeWidgets()[$widget]);
} | php | public function doesSupport($widget)
{
if (gettype($widget)!="string") {
$widget = get_class($widget);
}
return isset($this->themeWidgets()[$widget]);
} | [
"public",
"function",
"doesSupport",
"(",
"$",
"widget",
")",
"{",
"if",
"(",
"gettype",
"(",
"$",
"widget",
")",
"!=",
"\"string\"",
")",
"{",
"$",
"widget",
"=",
"get_class",
"(",
"$",
"widget",
")",
";",
"}",
"return",
"isset",
"(",
"$",
"this",
... | Whether theme support a widget
@param Widget $widget String of classname or object
@return boolean Whether theme support a widget | [
"Whether",
"theme",
"support",
"a",
"widget"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/Theme.php#L158-L164 |
koolphp/koolreport | src/core/Theme.php | Theme.getWidgetResourcesFor | public function getWidgetResourcesFor($widget)
{
$resources = array(
"js"=>array(),
"css"=>array(),
"replacingCss"=>array(),
"replacingJs"=>array(),
);
if (gettype($widget)!="string") {
$widget = get_class($widget);
... | php | public function getWidgetResourcesFor($widget)
{
$resources = array(
"js"=>array(),
"css"=>array(),
"replacingCss"=>array(),
"replacingJs"=>array(),
);
if (gettype($widget)!="string") {
$widget = get_class($widget);
... | [
"public",
"function",
"getWidgetResourcesFor",
"(",
"$",
"widget",
")",
"{",
"$",
"resources",
"=",
"array",
"(",
"\"js\"",
"=>",
"array",
"(",
")",
",",
"\"css\"",
"=>",
"array",
"(",
")",
",",
"\"replacingCss\"",
"=>",
"array",
"(",
")",
",",
"\"replac... | Return resources information of an widget
The method will check if the theme support this widget and if yes,
it will return supported resources provided by the theme.
@param mixed $widget We can input either name of widget class
or the widget object
@return array Associated array contaning resources for widget. | [
"Return",
"resources",
"information",
"of",
"an",
"widget"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/Theme.php#L177-L219 |
koolphp/koolreport | src/core/Theme.php | Theme.addingAssetUrl | protected function addingAssetUrl($assetUrl,$resources)
{
foreach ($resources as &$resource) {
if (gettype($resource)=="string") {
$resource = $assetUrl."/".$resource;
} else if (gettype($resource)=="array") {
$resource = $this->addingAssetUrl($assetUr... | php | protected function addingAssetUrl($assetUrl,$resources)
{
foreach ($resources as &$resource) {
if (gettype($resource)=="string") {
$resource = $assetUrl."/".$resource;
} else if (gettype($resource)=="array") {
$resource = $this->addingAssetUrl($assetUr... | [
"protected",
"function",
"addingAssetUrl",
"(",
"$",
"assetUrl",
",",
"$",
"resources",
")",
"{",
"foreach",
"(",
"$",
"resources",
"as",
"&",
"$",
"resource",
")",
"{",
"if",
"(",
"gettype",
"(",
"$",
"resource",
")",
"==",
"\"string\"",
")",
"{",
"$"... | Get resources in short format and return full url
to each component of resources
@param string $assetUrl The url to asset folder
@param array $resources Resources in short form
@return array Resource in long form. | [
"Get",
"resources",
"in",
"short",
"format",
"and",
"return",
"full",
"url",
"to",
"each",
"component",
"of",
"resources"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/Theme.php#L229-L239 |
koolphp/koolreport | src/core/DataStore.php | DataStore.meta | public function meta($metaData=null)
{
if ($metaData) {
$this->metaData = $metaData;
return $this;
} else {
return $this->metaData;
}
} | php | public function meta($metaData=null)
{
if ($metaData) {
$this->metaData = $metaData;
return $this;
} else {
return $this->metaData;
}
} | [
"public",
"function",
"meta",
"(",
"$",
"metaData",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"metaData",
")",
"{",
"$",
"this",
"->",
"metaData",
"=",
"$",
"metaData",
";",
"return",
"$",
"this",
";",
"}",
"else",
"{",
"return",
"$",
"this",
"->",
... | Get or set the meta data of datastore
If there is no parameter, the method will return current meta data.
If metaData is input, it will save that new meta data
@param array $metaData Associate array contaning meta data
@return array Meta data in array form
@since 1.0.0 | [
"Get",
"or",
"set",
"the",
"meta",
"data",
"of",
"datastore"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L125-L133 |
koolphp/koolreport | src/core/DataStore.php | DataStore.data | public function data($rows=null)
{
if ($rows!==null) {
$this->rows = $rows;
return $this;
} else {
return $this->rows;
}
} | php | public function data($rows=null)
{
if ($rows!==null) {
$this->rows = $rows;
return $this;
} else {
return $this->rows;
}
} | [
"public",
"function",
"data",
"(",
"$",
"rows",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"rows",
"!==",
"null",
")",
"{",
"$",
"this",
"->",
"rows",
"=",
"$",
"rows",
";",
"return",
"$",
"this",
";",
"}",
"else",
"{",
"return",
"$",
"this",
"->",... | Get or set data inside DataStore
If no parameter is input, the method will return all rows.
If rows parameter is input, method will save it
@param array $rows Rows of data
@return array Rows of data
@since 1.0.0 | [
"Get",
"or",
"set",
"data",
"inside",
"DataStore"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L147-L155 |
koolphp/koolreport | src/core/DataStore.php | DataStore.get | public function get($index=0,$colName=null)
{
if (isset($this->rows[$index])) {
if ($colName!==null) {
if (isset($this->rows[$index][$colName])) {
return $this->rows[$index][$colName];
}
} else {
return $this->rows[$... | php | public function get($index=0,$colName=null)
{
if (isset($this->rows[$index])) {
if ($colName!==null) {
if (isset($this->rows[$index][$colName])) {
return $this->rows[$index][$colName];
}
} else {
return $this->rows[$... | [
"public",
"function",
"get",
"(",
"$",
"index",
"=",
"0",
",",
"$",
"colName",
"=",
"null",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"rows",
"[",
"$",
"index",
"]",
")",
")",
"{",
"if",
"(",
"$",
"colName",
"!==",
"null",
")",
"{... | Return a data row at index or single value at column name
@param integer $index At what index you want to get row
@param string $colName What field you want to get value from
@return mixed Could be array of row or single value | [
"Return",
"a",
"data",
"row",
"at",
"index",
"or",
"single",
"value",
"at",
"column",
"name"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L199-L211 |
koolphp/koolreport | src/core/DataStore.php | DataStore.breakGroup | public function breakGroup($key,$func)
{
$data = array();
$start = 0;
foreach ($this->rows as $i=>$row) {
if (!isset($oldValue)) {
$oldValue = $row[$key];
}
if ($row[$key]==$oldValue) {
$oldValue = $row[$key];
... | php | public function breakGroup($key,$func)
{
$data = array();
$start = 0;
foreach ($this->rows as $i=>$row) {
if (!isset($oldValue)) {
$oldValue = $row[$key];
}
if ($row[$key]==$oldValue) {
$oldValue = $row[$key];
... | [
"public",
"function",
"breakGroup",
"(",
"$",
"key",
",",
"$",
"func",
")",
"{",
"$",
"data",
"=",
"array",
"(",
")",
";",
"$",
"start",
"=",
"0",
";",
"foreach",
"(",
"$",
"this",
"->",
"rows",
"as",
"$",
"i",
"=>",
"$",
"row",
")",
"{",
"if... | Break datastore into smaller group by specific column value
@param string $key The key column used to break datastore into groups
@param function $func Anonymous function to be called when a group is form
@return null | [
"Break",
"datastore",
"into",
"smaller",
"group",
"by",
"specific",
"column",
"value"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L221-L241 |
koolphp/koolreport | src/core/DataStore.php | DataStore.filter | public function filter()
{
$condition = func_get_args();
$cName = Utility::get($condition, 0);
if (gettype($cName)=="object" && is_callable($cName)) {
//Able to filter by function
return $this->filterByFunc($cName);
}
$operator = Utility::get($conditio... | php | public function filter()
{
$condition = func_get_args();
$cName = Utility::get($condition, 0);
if (gettype($cName)=="object" && is_callable($cName)) {
//Able to filter by function
return $this->filterByFunc($cName);
}
$operator = Utility::get($conditio... | [
"public",
"function",
"filter",
"(",
")",
"{",
"$",
"condition",
"=",
"func_get_args",
"(",
")",
";",
"$",
"cName",
"=",
"Utility",
"::",
"get",
"(",
"$",
"condition",
",",
"0",
")",
";",
"if",
"(",
"gettype",
"(",
"$",
"cName",
")",
"==",
"\"objec... | Filter the data set with condition
Examples:
$dataStore->filter('age','>',45);
$dataStore->filter('age','between',45,65);
@return DataStore New datastore with filtered result | [
"Filter",
"the",
"data",
"set",
"with",
"condition"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L253-L409 |
koolphp/koolreport | src/core/DataStore.php | DataStore.top | public function top($num,$offset=0)
{
$count = $this->countData();
$result = array();
for ($i=$offset;$i<$num+$offset && $i<$count;$i++) {
array_push($result, $this->rows[$i]);
}
return new DataStore($result, $this->metaData);
} | php | public function top($num,$offset=0)
{
$count = $this->countData();
$result = array();
for ($i=$offset;$i<$num+$offset && $i<$count;$i++) {
array_push($result, $this->rows[$i]);
}
return new DataStore($result, $this->metaData);
} | [
"public",
"function",
"top",
"(",
"$",
"num",
",",
"$",
"offset",
"=",
"0",
")",
"{",
"$",
"count",
"=",
"$",
"this",
"->",
"countData",
"(",
")",
";",
"$",
"result",
"=",
"array",
"(",
")",
";",
"for",
"(",
"$",
"i",
"=",
"$",
"offset",
";",... | Return top number of rows
It will return top rows starting at specified offset.
If offset is not specified, the default value is 0.
@param integer $num Number of top row you want to get
@param integer $offset At what index you want to start getting rows
@return DataStore New DataStore containing result | [
"Return",
"top",
"number",
"of",
"rows"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L438-L446 |
koolphp/koolreport | src/core/DataStore.php | DataStore.topByPercent | public function topByPercent($num)
{
$count = $this->countData();
return $this->top(round($num*$count/100));
} | php | public function topByPercent($num)
{
$count = $this->countData();
return $this->top(round($num*$count/100));
} | [
"public",
"function",
"topByPercent",
"(",
"$",
"num",
")",
"{",
"$",
"count",
"=",
"$",
"this",
"->",
"countData",
"(",
")",
";",
"return",
"$",
"this",
"->",
"top",
"(",
"round",
"(",
"$",
"num",
"*",
"$",
"count",
"/",
"100",
")",
")",
";",
... | Return top percent of row
@param float $num What top percent of row you want to return
@return DataStore New datastore containing result. | [
"Return",
"top",
"percent",
"of",
"row"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L455-L459 |
koolphp/koolreport | src/core/DataStore.php | DataStore.bottom | public function bottom($num)
{
$count = $this->countData();
$result = array();
$start = ($count>$num)?$count-$num:0;
for ($i=$start;$i<$count;$i++) {
array_push($result, $this->rows[$i]);
}
return new DataStore($result, $this->metaData);
} | php | public function bottom($num)
{
$count = $this->countData();
$result = array();
$start = ($count>$num)?$count-$num:0;
for ($i=$start;$i<$count;$i++) {
array_push($result, $this->rows[$i]);
}
return new DataStore($result, $this->metaData);
} | [
"public",
"function",
"bottom",
"(",
"$",
"num",
")",
"{",
"$",
"count",
"=",
"$",
"this",
"->",
"countData",
"(",
")",
";",
"$",
"result",
"=",
"array",
"(",
")",
";",
"$",
"start",
"=",
"(",
"$",
"count",
">",
"$",
"num",
")",
"?",
"$",
"co... | Return bottom rows of dataset
@param float $num Number of rows you want to return
@return DataStore New datastore containing result. | [
"Return",
"bottom",
"rows",
"of",
"dataset"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L468-L477 |
koolphp/koolreport | src/core/DataStore.php | DataStore.bottomByPercent | public function bottomByPercent($num)
{
$count = $this->countData();
return $this->bottom(round($num*$count/100));
} | php | public function bottomByPercent($num)
{
$count = $this->countData();
return $this->bottom(round($num*$count/100));
} | [
"public",
"function",
"bottomByPercent",
"(",
"$",
"num",
")",
"{",
"$",
"count",
"=",
"$",
"this",
"->",
"countData",
"(",
")",
";",
"return",
"$",
"this",
"->",
"bottom",
"(",
"round",
"(",
"$",
"num",
"*",
"$",
"count",
"/",
"100",
")",
")",
"... | Return the bottom rows by percent
Example: Return 20% bottom rows
$dataSore->bottomByPercent(20);
@param float $num The number in percent
@return DataStore The new datastore containing result | [
"Return",
"the",
"bottom",
"rows",
"by",
"percent"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L488-L492 |
koolphp/koolreport | src/core/DataStore.php | DataStore.sum | public function sum($colName)
{
$sum = 0;
foreach ($this->rows as $row) {
$sum+=$row[$colName];
}
return $sum;
} | php | public function sum($colName)
{
$sum = 0;
foreach ($this->rows as $row) {
$sum+=$row[$colName];
}
return $sum;
} | [
"public",
"function",
"sum",
"(",
"$",
"colName",
")",
"{",
"$",
"sum",
"=",
"0",
";",
"foreach",
"(",
"$",
"this",
"->",
"rows",
"as",
"$",
"row",
")",
"{",
"$",
"sum",
"+=",
"$",
"row",
"[",
"$",
"colName",
"]",
";",
"}",
"return",
"$",
"su... | Return the sum of a field
Examples: $totalSales = $dataStore->sum("saleAmount");
@param string $colName Name of column you want to sum
@return float Sum of column | [
"Return",
"the",
"sum",
"of",
"a",
"field"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L504-L511 |
koolphp/koolreport | src/core/DataStore.php | DataStore.min | public function min($colName)
{
$min = INF;
foreach ($this->rows as $row) {
if ($min>$row[$colName]) {
$min = $row[$colName];
}
}
return $min;
} | php | public function min($colName)
{
$min = INF;
foreach ($this->rows as $row) {
if ($min>$row[$colName]) {
$min = $row[$colName];
}
}
return $min;
} | [
"public",
"function",
"min",
"(",
"$",
"colName",
")",
"{",
"$",
"min",
"=",
"INF",
";",
"foreach",
"(",
"$",
"this",
"->",
"rows",
"as",
"$",
"row",
")",
"{",
"if",
"(",
"$",
"min",
">",
"$",
"row",
"[",
"$",
"colName",
"]",
")",
"{",
"$",
... | Return the min value of a field
Examples: $minSale = $dataStore->min("saleAmount");
@param string $colName Name of column you want to get min
@return float Min value of column | [
"Return",
"the",
"min",
"value",
"of",
"a",
"field"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L522-L532 |
koolphp/koolreport | src/core/DataStore.php | DataStore.max | public function max($colName)
{
$max = -INF;
foreach ($this->rows as $row) {
if ($max<$row[$colName]) {
$max = $row[$colName];
}
}
return $max;
} | php | public function max($colName)
{
$max = -INF;
foreach ($this->rows as $row) {
if ($max<$row[$colName]) {
$max = $row[$colName];
}
}
return $max;
} | [
"public",
"function",
"max",
"(",
"$",
"colName",
")",
"{",
"$",
"max",
"=",
"-",
"INF",
";",
"foreach",
"(",
"$",
"this",
"->",
"rows",
"as",
"$",
"row",
")",
"{",
"if",
"(",
"$",
"max",
"<",
"$",
"row",
"[",
"$",
"colName",
"]",
")",
"{",
... | Return the max of a field
Examples: $maxSale = $dataStore->max("saleAmount");
@param string $colName Name of column you want to get max
@return float Max value of column | [
"Return",
"the",
"max",
"of",
"a",
"field"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L542-L551 |
koolphp/koolreport | src/core/DataStore.php | DataStore.avg | public function avg($colName)
{
if ($this->countData()>0) {
return $this->sum($colName)/$this->countData();
}
return false;
} | php | public function avg($colName)
{
if ($this->countData()>0) {
return $this->sum($colName)/$this->countData();
}
return false;
} | [
"public",
"function",
"avg",
"(",
"$",
"colName",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"countData",
"(",
")",
">",
"0",
")",
"{",
"return",
"$",
"this",
"->",
"sum",
"(",
"$",
"colName",
")",
"/",
"$",
"this",
"->",
"countData",
"(",
")",
";... | Return the average value of a field
Examples: $averageSale = $dataStore->avg("saleAmount");
@param string $colName Name of column you want to get average
@return float Average value of column | [
"Return",
"the",
"average",
"value",
"of",
"a",
"field"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L562-L568 |
koolphp/koolreport | src/core/DataStore.php | DataStore.process | public function process($process)
{
$ds = new DataStore;
$process->pipe($ds);
$top_process = $process;
while ($top_process->previous()!=null) {
$top_process = $top_process->previous();
}
$top_process->receiveMeta($this->metaData, $this);
$top_proce... | php | public function process($process)
{
$ds = new DataStore;
$process->pipe($ds);
$top_process = $process;
while ($top_process->previous()!=null) {
$top_process = $top_process->previous();
}
$top_process->receiveMeta($this->metaData, $this);
$top_proce... | [
"public",
"function",
"process",
"(",
"$",
"process",
")",
"{",
"$",
"ds",
"=",
"new",
"DataStore",
";",
"$",
"process",
"->",
"pipe",
"(",
"$",
"ds",
")",
";",
"$",
"top_process",
"=",
"$",
"process",
";",
"while",
"(",
"$",
"top_process",
"->",
"... | Pipe rows of data to process and get result
Sometime you may need to further process data event they has reach
datastore, you may do so with this method.
Examples: $groupData = $dataStore->process(Group::process(["by"=>"date"]));
@param string $process A new series of process you want data to go through
@return Dat... | [
"Pipe",
"rows",
"of",
"data",
"to",
"process",
"and",
"get",
"result"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L582-L598 |
koolphp/koolreport | src/core/DataStore.php | DataStore.each | public function each($cb)
{
foreach ($this->rows as $index=>$row) {
$result = $cb($row, $index);
if (is_array($result)) {
$this->rows[$index] = $result;
} else if ($result===false) {
break;
}
}
return $this;
... | php | public function each($cb)
{
foreach ($this->rows as $index=>$row) {
$result = $cb($row, $index);
if (is_array($result)) {
$this->rows[$index] = $result;
} else if ($result===false) {
break;
}
}
return $this;
... | [
"public",
"function",
"each",
"(",
"$",
"cb",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"rows",
"as",
"$",
"index",
"=>",
"$",
"row",
")",
"{",
"$",
"result",
"=",
"$",
"cb",
"(",
"$",
"row",
",",
"$",
"index",
")",
";",
"if",
"(",
"is_arr... | Loop through each rows of data set
Examples:
$store->each(function($row,$index){
//Do something
});
@param function $cb A function that take row as parameter
@return DataStore This datastore | [
"Loop",
"through",
"each",
"rows",
"of",
"data",
"set"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L709-L720 |
koolphp/koolreport | src/core/DataStore.php | DataStore.except | public function except()
{
$cols = func_get_args();
//method returns all rows in the collection except for those with the specified keys
$dstore = new DataStore;
foreach ($this->rows as $row) {
foreach ($cols as $col) {
if (isset($row[$col])) {
... | php | public function except()
{
$cols = func_get_args();
//method returns all rows in the collection except for those with the specified keys
$dstore = new DataStore;
foreach ($this->rows as $row) {
foreach ($cols as $col) {
if (isset($row[$col])) {
... | [
"public",
"function",
"except",
"(",
")",
"{",
"$",
"cols",
"=",
"func_get_args",
"(",
")",
";",
"//method returns all rows in the collection except for those with the specified keys",
"$",
"dstore",
"=",
"new",
"DataStore",
";",
"foreach",
"(",
"$",
"this",
"->",
"... | Return new datastore with all columns except some
Examples
$newStore = $store->except("age","city");
@return DataStore New datastore containing result | [
"Return",
"new",
"datastore",
"with",
"all",
"columns",
"except",
"some"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L731-L755 |
koolphp/koolreport | src/core/DataStore.php | DataStore.only | public function only()
{
//Only colname
$cols = func_get_args();
$dstore = new DataStore;
foreach ($this->rows as $row) {
$new_row = array();
foreach ($cols as $col) {
$new_row[$col] = $row[$col];
}
$dstore->push($new_r... | php | public function only()
{
//Only colname
$cols = func_get_args();
$dstore = new DataStore;
foreach ($this->rows as $row) {
$new_row = array();
foreach ($cols as $col) {
$new_row[$col] = $row[$col];
}
$dstore->push($new_r... | [
"public",
"function",
"only",
"(",
")",
"{",
"//Only colname",
"$",
"cols",
"=",
"func_get_args",
"(",
")",
";",
"$",
"dstore",
"=",
"new",
"DataStore",
";",
"foreach",
"(",
"$",
"this",
"->",
"rows",
"as",
"$",
"row",
")",
"{",
"$",
"new_row",
"=",
... | Get new datastore containing some of the columns
Examples:
$newStore = $store->only("name","age");
@return DataStore New datastore containing result | [
"Get",
"new",
"datastore",
"containing",
"some",
"of",
"the",
"columns"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L766-L788 |
koolphp/koolreport | src/core/DataStore.php | DataStore.filterByFunc | public function filterByFunc($cb)
{
//method filters the collection using the given callback, keeping only those rows that pass a given truth test
$dstore = new DataStore;
$dstore->meta($this->metaData);
foreach ($this->rows as $index=>$row) {
if ($cb($row, $index)===true... | php | public function filterByFunc($cb)
{
//method filters the collection using the given callback, keeping only those rows that pass a given truth test
$dstore = new DataStore;
$dstore->meta($this->metaData);
foreach ($this->rows as $index=>$row) {
if ($cb($row, $index)===true... | [
"public",
"function",
"filterByFunc",
"(",
"$",
"cb",
")",
"{",
"//method filters the collection using the given callback, keeping only those rows that pass a given truth test",
"$",
"dstore",
"=",
"new",
"DataStore",
";",
"$",
"dstore",
"->",
"meta",
"(",
"$",
"this",
"-... | Get filtered results by function
A row will go through if function return true
@param function $cb Callback function
@return DataSore New datastore containing filtered results. | [
"Get",
"filtered",
"results",
"by",
"function"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L799-L810 |
koolphp/koolreport | src/core/DataStore.php | DataStore.first | public function first($cb=null)
{
if ($cb==null) {
return $this->isNotEmpty()?$this->rows[0]:null;
} else {
// method returns the first element in the collection that passes
//a given truth test
foreach ($this->rows as $index=>$row) {
... | php | public function first($cb=null)
{
if ($cb==null) {
return $this->isNotEmpty()?$this->rows[0]:null;
} else {
// method returns the first element in the collection that passes
//a given truth test
foreach ($this->rows as $index=>$row) {
... | [
"public",
"function",
"first",
"(",
"$",
"cb",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"cb",
"==",
"null",
")",
"{",
"return",
"$",
"this",
"->",
"isNotEmpty",
"(",
")",
"?",
"$",
"this",
"->",
"rows",
"[",
"0",
"]",
":",
"null",
";",
"}",
"el... | Return a first row meet a condition defined by callback function
$row = $store->first(fucntion($row){
return $row["age"]>20;
});
@param function $cb Callback function that return true if a row meets condition
@return array The first row that meets condition. | [
"Return",
"a",
"first",
"row",
"meet",
"a",
"condition",
"defined",
"by",
"callback",
"function"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L823-L837 |
koolphp/koolreport | src/core/DataStore.php | DataStore.last | public function last($cb=null)
{
if ($cb==null) {
return $this->isNotEmpty()?$this->rows[$this->count()-1]:null;
} else {
//method returns the last element in the collection that passes a given truth test:
$count = $this->count();
for ($i=0;$i<$count;$... | php | public function last($cb=null)
{
if ($cb==null) {
return $this->isNotEmpty()?$this->rows[$this->count()-1]:null;
} else {
//method returns the last element in the collection that passes a given truth test:
$count = $this->count();
for ($i=0;$i<$count;$... | [
"public",
"function",
"last",
"(",
"$",
"cb",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"cb",
"==",
"null",
")",
"{",
"return",
"$",
"this",
"->",
"isNotEmpty",
"(",
")",
"?",
"$",
"this",
"->",
"rows",
"[",
"$",
"this",
"->",
"count",
"(",
")",
... | Return the last row that meets a condition set by callback function
Examples:
$lastRow = $store->last(function($row){
return $row["age"]<65;
});
@param function $cb Callback function
@return array The last row that meet conditon | [
"Return",
"the",
"last",
"row",
"that",
"meets",
"a",
"condition",
"set",
"by",
"callback",
"function"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L866-L880 |
koolphp/koolreport | src/core/DataStore.php | DataStore.mode | public function mode($colName)
{
$counts = array();
foreach ($this->rows as $row) {
$counts[$row[$colName]] = isset($counts[$row[$colName]])?
$counts[$row[$colName]]+1:1;
}
arsort($counts);
$list = array_keys($counts);
return $list[0];
... | php | public function mode($colName)
{
$counts = array();
foreach ($this->rows as $row) {
$counts[$row[$colName]] = isset($counts[$row[$colName]])?
$counts[$row[$colName]]+1:1;
}
arsort($counts);
$list = array_keys($counts);
return $list[0];
... | [
"public",
"function",
"mode",
"(",
"$",
"colName",
")",
"{",
"$",
"counts",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"rows",
"as",
"$",
"row",
")",
"{",
"$",
"counts",
"[",
"$",
"row",
"[",
"$",
"colName",
"]",
"]",
"=",
... | Return the mode value of a field
@param string $colName Column name
@return float The mode value of the column | [
"Return",
"the",
"mode",
"value",
"of",
"a",
"field"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L889-L899 |
koolphp/koolreport | src/core/DataStore.php | DataStore.pluck | public function pluck($colName)
{
$result = array();
foreach ($this->rows as $row) {
array_push($result, $row[$colName]);
}
return $result;
} | php | public function pluck($colName)
{
$result = array();
foreach ($this->rows as $row) {
array_push($result, $row[$colName]);
}
return $result;
} | [
"public",
"function",
"pluck",
"(",
"$",
"colName",
")",
"{",
"$",
"result",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"rows",
"as",
"$",
"row",
")",
"{",
"array_push",
"(",
"$",
"result",
",",
"$",
"row",
"[",
"$",
"colName... | Return all value of a column in array
@param string $colName Column name
@return array Array containing all values of the column | [
"Return",
"all",
"value",
"of",
"a",
"column",
"in",
"array"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L908-L915 |
koolphp/koolreport | src/core/DataStore.php | DataStore.reject | public function reject($cb)
{
$dstore = new DataStore;
$dstore->meta($this->metaData);
foreach ($this->rows as $index=>$row) {
if ($cb($row, $index)===false) {
$dstore->append($row);
}
}
return $dstore;
} | php | public function reject($cb)
{
$dstore = new DataStore;
$dstore->meta($this->metaData);
foreach ($this->rows as $index=>$row) {
if ($cb($row, $index)===false) {
$dstore->append($row);
}
}
return $dstore;
} | [
"public",
"function",
"reject",
"(",
"$",
"cb",
")",
"{",
"$",
"dstore",
"=",
"new",
"DataStore",
";",
"$",
"dstore",
"->",
"meta",
"(",
"$",
"this",
"->",
"metaData",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"rows",
"as",
"$",
"index",
"=>",
... | Reject some rows that meets condition
@param function $cb Callback function
@return DataStore New datastore containing results. | [
"Reject",
"some",
"rows",
"that",
"meets",
"condition"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L924-L934 |
koolphp/koolreport | src/core/DataStore.php | DataStore.slice | public function slice($offset, $length = null)
{
return new DataStore(
array_slice($this->rows, $offset, $length),
$this->metaData
);
} | php | public function slice($offset, $length = null)
{
return new DataStore(
array_slice($this->rows, $offset, $length),
$this->metaData
);
} | [
"public",
"function",
"slice",
"(",
"$",
"offset",
",",
"$",
"length",
"=",
"null",
")",
"{",
"return",
"new",
"DataStore",
"(",
"array_slice",
"(",
"$",
"this",
"->",
"rows",
",",
"$",
"offset",
",",
"$",
"length",
")",
",",
"$",
"this",
"->",
"me... | Get slice of data
@param integer $offset Starting row to get offset
@param integer $length Number of rows to take, if not specified, all row after $offset will be returned.
@return DataStore New datastore containing results. | [
"Get",
"slice",
"of",
"data"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L944-L950 |
koolphp/koolreport | src/core/DataStore.php | DataStore.sort | public function sort($sorts)
{
usort($this->rows,
function ($a, $b) use ($sorts) {
$cmp = 0;
foreach ($sorts as $sort => $direction) {
if (is_string($direction)) {
$cmp = is_numeric($a[$sort]) && is_numeric($b[$sort]) ?... | php | public function sort($sorts)
{
usort($this->rows,
function ($a, $b) use ($sorts) {
$cmp = 0;
foreach ($sorts as $sort => $direction) {
if (is_string($direction)) {
$cmp = is_numeric($a[$sort]) && is_numeric($b[$sort]) ?... | [
"public",
"function",
"sort",
"(",
"$",
"sorts",
")",
"{",
"usort",
"(",
"$",
"this",
"->",
"rows",
",",
"function",
"(",
"$",
"a",
",",
"$",
"b",
")",
"use",
"(",
"$",
"sorts",
")",
"{",
"$",
"cmp",
"=",
"0",
";",
"foreach",
"(",
"$",
"sorts... | Sort the rows of data
Examples:
$store->sort(array("age"=>"desc"));
@param array $sorts Condition of sorting
@return DataStore This datastore | [
"Sort",
"the",
"rows",
"of",
"data"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L963-L984 |
koolphp/koolreport | src/core/DataStore.php | DataStore.sortKeys | public function sortKeys()
{
if ($this->isNotEmpty()) {
foreach ($this->rows as &$row) {
ksort($row);
}
}
return $this;
} | php | public function sortKeys()
{
if ($this->isNotEmpty()) {
foreach ($this->rows as &$row) {
ksort($row);
}
}
return $this;
} | [
"public",
"function",
"sortKeys",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"isNotEmpty",
"(",
")",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"rows",
"as",
"&",
"$",
"row",
")",
"{",
"ksort",
"(",
"$",
"row",
")",
";",
"}",
"}",
"return",... | Sort asc data rows by column name
@return DataStore This datastore after sorted. | [
"Sort",
"asc",
"data",
"rows",
"by",
"column",
"name"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L1004-L1012 |
koolphp/koolreport | src/core/DataStore.php | DataStore.sortKeysDesc | public function sortKeysDesc()
{
if ($this->isNotEmpty()) {
foreach ($this->rows as &$row) {
krsort($row);
}
}
return $this;
} | php | public function sortKeysDesc()
{
if ($this->isNotEmpty()) {
foreach ($this->rows as &$row) {
krsort($row);
}
}
return $this;
} | [
"public",
"function",
"sortKeysDesc",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"isNotEmpty",
"(",
")",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"rows",
"as",
"&",
"$",
"row",
")",
"{",
"krsort",
"(",
"$",
"row",
")",
";",
"}",
"}",
"ret... | Sort desc data rows by column name
@return DataStore This datastore after sorted. | [
"Sort",
"desc",
"data",
"rows",
"by",
"column",
"name"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L1018-L1026 |
koolphp/koolreport | src/core/DataStore.php | DataStore.splice | public function splice($offset, $length = null, $replacement = [])
{
if (func_num_args() == 1) {
return new DataStore(
array_splice($this->rows, $offset),
$this->metaData
);
}
return new DataStore(
array_splice($this->rows... | php | public function splice($offset, $length = null, $replacement = [])
{
if (func_num_args() == 1) {
return new DataStore(
array_splice($this->rows, $offset),
$this->metaData
);
}
return new DataStore(
array_splice($this->rows... | [
"public",
"function",
"splice",
"(",
"$",
"offset",
",",
"$",
"length",
"=",
"null",
",",
"$",
"replacement",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"func_num_args",
"(",
")",
"==",
"1",
")",
"{",
"return",
"new",
"DataStore",
"(",
"array_splice",
"(",
... | Splice the data and replace
@param integer $offset Starting row to get
@param integer $length How many rows to get
@param array $replacement Optional! Replaced rows
@return DataStore New dataStore containing results. | [
"Splice",
"the",
"data",
"and",
"replace"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L1037-L1050 |
koolphp/koolreport | src/core/DataStore.php | DataStore.where | public function where($key,$value)
{
$dstore= new DataStore;
$dstore->meta($this->metaData);
foreach ($this->rows as $row) {
if ($row[$key]==$value) {
$dstore->append($row);
}
}
return $dstore;
} | php | public function where($key,$value)
{
$dstore= new DataStore;
$dstore->meta($this->metaData);
foreach ($this->rows as $row) {
if ($row[$key]==$value) {
$dstore->append($row);
}
}
return $dstore;
} | [
"public",
"function",
"where",
"(",
"$",
"key",
",",
"$",
"value",
")",
"{",
"$",
"dstore",
"=",
"new",
"DataStore",
";",
"$",
"dstore",
"->",
"meta",
"(",
"$",
"this",
"->",
"metaData",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"rows",
"as",
... | Return rows that has column equal to certain value
@param string $key Column name
@param mixed $value Value to compare
@return DataStore New dataStore containing results | [
"Return",
"rows",
"that",
"has",
"column",
"equal",
"to",
"certain",
"value"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L1087-L1097 |
koolphp/koolreport | src/core/DataStore.php | DataStore.whereIn | public function whereIn($key,$values=array())
{
$dstore= new DataStore;
$dstore->meta($this->metaData);
foreach ($this->rows as $row) {
if (in_array($row[$key], $values)) {
$dstore->append($row);
}
}
return $dstore;
} | php | public function whereIn($key,$values=array())
{
$dstore= new DataStore;
$dstore->meta($this->metaData);
foreach ($this->rows as $row) {
if (in_array($row[$key], $values)) {
$dstore->append($row);
}
}
return $dstore;
} | [
"public",
"function",
"whereIn",
"(",
"$",
"key",
",",
"$",
"values",
"=",
"array",
"(",
")",
")",
"{",
"$",
"dstore",
"=",
"new",
"DataStore",
";",
"$",
"dstore",
"->",
"meta",
"(",
"$",
"this",
"->",
"metaData",
")",
";",
"foreach",
"(",
"$",
"... | Return rows that column contains value in an array.
@param string $key Column name
@param array $values List of values
@return DataStore New datastore containing results. | [
"Return",
"rows",
"that",
"column",
"contains",
"value",
"in",
"an",
"array",
"."
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L1107-L1117 |
koolphp/koolreport | src/core/DataStore.php | DataStore._mapKeyIndex | private function _mapKeyIndex($arr,$keys)
{
$maps = array();
foreach ($arr as $index=>$row) {
$key = "n";
foreach ($keys as $cName) {
$key.=$row[$cName];
}
if (!isset($maps[$key])) {
$maps[$key] = array();
}
... | php | private function _mapKeyIndex($arr,$keys)
{
$maps = array();
foreach ($arr as $index=>$row) {
$key = "n";
foreach ($keys as $cName) {
$key.=$row[$cName];
}
if (!isset($maps[$key])) {
$maps[$key] = array();
}
... | [
"private",
"function",
"_mapKeyIndex",
"(",
"$",
"arr",
",",
"$",
"keys",
")",
"{",
"$",
"maps",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"arr",
"as",
"$",
"index",
"=>",
"$",
"row",
")",
"{",
"$",
"key",
"=",
"\"n\"",
";",
"foreach",
... | Map Key Index
@param array $arr Array to map
@param array $keys List of keys
@return array Return new map | [
"Map",
"Key",
"Index"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L1145-L1159 |
koolphp/koolreport | src/core/DataStore.php | DataStore.join | public function join($secondStore,$matching)
{
$dstore = new DataStore;
// join with other datasource to produce new one with above condition
$firstKeys = array_keys($matching);
$secondKeys = array_values($matching);
$firstMaps = $this->_mapKeyIndex($this->r... | php | public function join($secondStore,$matching)
{
$dstore = new DataStore;
// join with other datasource to produce new one with above condition
$firstKeys = array_keys($matching);
$secondKeys = array_values($matching);
$firstMaps = $this->_mapKeyIndex($this->r... | [
"public",
"function",
"join",
"(",
"$",
"secondStore",
",",
"$",
"matching",
")",
"{",
"$",
"dstore",
"=",
"new",
"DataStore",
";",
"// join with other datasource to produce new one with above condition",
"$",
"firstKeys",
"=",
"array_keys",
"(",
"$",
"matching",
")... | Join with another datastore on a matching keys
Examples
$store1->join($store2,array("id"=>"userId"));
@param DataStore $secondStore Second datastore
@param array $matching Matching keys
@return DataStore New datastore containing results. | [
"Join",
"with",
"another",
"datastore",
"on",
"a",
"matching",
"keys"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L1183-L1212 |
koolphp/koolreport | src/core/DataStore.php | DataStore.leftJoin | public function leftJoin($secondStore,$matching)
{
$dstore = new DataStore;
// join with other datasource to produce new one with above condition
$firstKeys = array_keys($matching);
$secondKeys = array_values($matching);
$firstMaps = $this->_mapKeyIndex($thi... | php | public function leftJoin($secondStore,$matching)
{
$dstore = new DataStore;
// join with other datasource to produce new one with above condition
$firstKeys = array_keys($matching);
$secondKeys = array_values($matching);
$firstMaps = $this->_mapKeyIndex($thi... | [
"public",
"function",
"leftJoin",
"(",
"$",
"secondStore",
",",
"$",
"matching",
")",
"{",
"$",
"dstore",
"=",
"new",
"DataStore",
";",
"// join with other datasource to produce new one with above condition",
"$",
"firstKeys",
"=",
"array_keys",
"(",
"$",
"matching",
... | Left join with another datastore on matching keys
Examples
$store1->join($store2,array("id"=>"userId"));
@param DataStore $secondStore Second datastore
@param array $matching Matching keys
@return DataStore New datastore containing results. | [
"Left",
"join",
"with",
"another",
"datastore",
"on",
"matching",
"keys"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L1226-L1270 |
koolphp/koolreport | src/core/DataStore.php | DataStore.columnMeta | public function columnMeta($settings)
{
foreach ($settings as $cName=>$cMeta) {
if (isset($this->metaData["columns"]) && $this->metaData["columns"][$cName]) {
$this->metaData["columns"][$cName] = array_merge(
$this->metaData["columns"][$cName],
... | php | public function columnMeta($settings)
{
foreach ($settings as $cName=>$cMeta) {
if (isset($this->metaData["columns"]) && $this->metaData["columns"][$cName]) {
$this->metaData["columns"][$cName] = array_merge(
$this->metaData["columns"][$cName],
... | [
"public",
"function",
"columnMeta",
"(",
"$",
"settings",
")",
"{",
"foreach",
"(",
"$",
"settings",
"as",
"$",
"cName",
"=>",
"$",
"cMeta",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"metaData",
"[",
"\"columns\"",
"]",
")",
"&&",
"$",
... | Add extra column meta to existing
Examples
$store1->columnMeta(array(
"age"=>array(
"name"=>"Age"
)
));
@param DataStore $settings The additional settings for column
@return DataStore New datastore containing results. | [
"Add",
"extra",
"column",
"meta",
"to",
"existing"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L1287-L1298 |
koolphp/koolreport | src/core/DataStore.php | DataStore.offsetSet | public function offsetSet($index, $row)
{
if (is_null($index)) {
$this->rows[] = $row;
} else {
$this->rows[$index] = $row;
}
} | php | public function offsetSet($index, $row)
{
if (is_null($index)) {
$this->rows[] = $row;
} else {
$this->rows[$index] = $row;
}
} | [
"public",
"function",
"offsetSet",
"(",
"$",
"index",
",",
"$",
"row",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"index",
")",
")",
"{",
"$",
"this",
"->",
"rows",
"[",
"]",
"=",
"$",
"row",
";",
"}",
"else",
"{",
"$",
"this",
"->",
"rows",
"... | Implement offsetSet for ArrayAccess interface
@param integer $index The index of row needed to be added
@param array $row The row need to add
@return null | [
"Implement",
"offsetSet",
"for",
"ArrayAccess",
"interface"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L1317-L1324 |
koolphp/koolreport | src/core/DataStore.php | DataStore.offsetGet | public function offsetGet($index)
{
return isset($this->rows[$index]) ? $this->rows[$index] : null;
} | php | public function offsetGet($index)
{
return isset($this->rows[$index]) ? $this->rows[$index] : null;
} | [
"public",
"function",
"offsetGet",
"(",
"$",
"index",
")",
"{",
"return",
"isset",
"(",
"$",
"this",
"->",
"rows",
"[",
"$",
"index",
"]",
")",
"?",
"$",
"this",
"->",
"rows",
"[",
"$",
"index",
"]",
":",
"null",
";",
"}"
] | Implement offsetGet for ArrayAccess interface
@param integer $index The index of row need to be removed
@return array The row data at the context | [
"Implement",
"offsetGet",
"for",
"ArrayAccess",
"interface"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/DataStore.php#L1357-L1360 |
koolphp/koolreport | src/processes/NumberRange.php | NumberRange.onMetaReceived | protected function onMetaReceived($metaData)
{
foreach ($this->params as $cName => $cParams) {
$metaData["columns"][$cName] = array(
"type" => "string",
);
}
return $metaData;
} | php | protected function onMetaReceived($metaData)
{
foreach ($this->params as $cName => $cParams) {
$metaData["columns"][$cName] = array(
"type" => "string",
);
}
return $metaData;
} | [
"protected",
"function",
"onMetaReceived",
"(",
"$",
"metaData",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"params",
"as",
"$",
"cName",
"=>",
"$",
"cParams",
")",
"{",
"$",
"metaData",
"[",
"\"columns\"",
"]",
"[",
"$",
"cName",
"]",
"=",
"array",
... | Handle on meta received
@param array $metaData The meta data
@return array New meta data | [
"Handle",
"on",
"meta",
"received"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/NumberRange.php#L48-L56 |
koolphp/koolreport | src/processes/NumberRange.php | NumberRange.onInput | protected function onInput($data)
{
//Process data here
foreach ($this->params as $cName => $cParams) {
$value = null;
foreach ($cParams as $cValue => $criteria) {
$from = Utility::get($criteria, 0);
$to = Utility::get($criteria, 1);
... | php | protected function onInput($data)
{
//Process data here
foreach ($this->params as $cName => $cParams) {
$value = null;
foreach ($cParams as $cValue => $criteria) {
$from = Utility::get($criteria, 0);
$to = Utility::get($criteria, 1);
... | [
"protected",
"function",
"onInput",
"(",
"$",
"data",
")",
"{",
"//Process data here",
"foreach",
"(",
"$",
"this",
"->",
"params",
"as",
"$",
"cName",
"=>",
"$",
"cParams",
")",
"{",
"$",
"value",
"=",
"null",
";",
"foreach",
"(",
"$",
"cParams",
"as"... | Handle on data input
@param array $data The input data row
@return null | [
"Handle",
"on",
"data",
"input"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/processes/NumberRange.php#L65-L80 |
koolphp/koolreport | src/core/ResourceManager.php | ResourceManager.publishAssetFolder | public function publishAssetFolder($fullLocalPath,$version="")
{
$fullLocalPath = Utility::standardizePathSeparator($fullLocalPath);
$fullLocalPath = Utility::getSymbolicPath($fullLocalPath);
$assets = Utility::get($this->report->getSettings(), "assets");
$document_root = Ut... | php | public function publishAssetFolder($fullLocalPath,$version="")
{
$fullLocalPath = Utility::standardizePathSeparator($fullLocalPath);
$fullLocalPath = Utility::getSymbolicPath($fullLocalPath);
$assets = Utility::get($this->report->getSettings(), "assets");
$document_root = Ut... | [
"public",
"function",
"publishAssetFolder",
"(",
"$",
"fullLocalPath",
",",
"$",
"version",
"=",
"\"\"",
")",
"{",
"$",
"fullLocalPath",
"=",
"Utility",
"::",
"standardizePathSeparator",
"(",
"$",
"fullLocalPath",
")",
";",
"$",
"fullLocalPath",
"=",
"Utility",
... | Copy private asset folder to public place and return public asset url
@param string $fullLocalPath Full local path to the asset folder
@param string $version Version of the asset folder, normally
it is the version of widget
@return string The public url to asset folder | [
"Copy",
"private",
"asset",
"folder",
"to",
"public",
"place",
"and",
"return",
"public",
"asset",
"url"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/ResourceManager.php#L75-L174 |
koolphp/koolreport | src/core/ResourceManager.php | ResourceManager.addScriptFile | protected function addScriptFile($src, $options=array(), $at="begin")
{
$options["type"] = Utility::get($options, "type", "text/javascript");
$options["src"] = $src;
$this->tags[md5($src)] = array(
"at"=>$at,
"tag"=>"script",
"options"=>$options,
... | php | protected function addScriptFile($src, $options=array(), $at="begin")
{
$options["type"] = Utility::get($options, "type", "text/javascript");
$options["src"] = $src;
$this->tags[md5($src)] = array(
"at"=>$at,
"tag"=>"script",
"options"=>$options,
... | [
"protected",
"function",
"addScriptFile",
"(",
"$",
"src",
",",
"$",
"options",
"=",
"array",
"(",
")",
",",
"$",
"at",
"=",
"\"begin\"",
")",
"{",
"$",
"options",
"[",
"\"type\"",
"]",
"=",
"Utility",
"::",
"get",
"(",
"$",
"options",
",",
"\"type\"... | Add script file to report
@param string $src Url link to javascript file
@param array $options Additional options for script tag
@param string $at The location of the script whether at "begin"
of report or at "end" of report
@return ResourceManager this resource manager object | [
"Add",
"script",
"file",
"to",
"report"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/ResourceManager.php#L212-L223 |
koolphp/koolreport | src/core/ResourceManager.php | ResourceManager.addScript | protected function addScript($script,$options=array(),$at='begin')
{
$options["type"] = Utility::get($options, "type", "text/javascript");
$this->tags[md5($script)] = array(
"at"=>$at,
"tag"=>"script",
"options"=>$options,
"content"=>$script,
)... | php | protected function addScript($script,$options=array(),$at='begin')
{
$options["type"] = Utility::get($options, "type", "text/javascript");
$this->tags[md5($script)] = array(
"at"=>$at,
"tag"=>"script",
"options"=>$options,
"content"=>$script,
)... | [
"protected",
"function",
"addScript",
"(",
"$",
"script",
",",
"$",
"options",
"=",
"array",
"(",
")",
",",
"$",
"at",
"=",
"'begin'",
")",
"{",
"$",
"options",
"[",
"\"type\"",
"]",
"=",
"Utility",
"::",
"get",
"(",
"$",
"options",
",",
"\"type\"",
... | Add a custom script to the report
@param string $script Javascript code we want to run
@param array $options Any additional options you want to put to script tag
@param string $at The location you want to add the script to whether
at "begin" of report or at the "end" of report
@return ResourceManager This reso... | [
"Add",
"a",
"custom",
"script",
"to",
"the",
"report"
] | train | https://github.com/koolphp/koolreport/blob/1ffa6c481535eac59df0852a6eeaa9ff87170e98/src/core/ResourceManager.php#L262-L272 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.