MCPcopy Create free account
hub / github.com/Rello/analytics / extractArrayFields

Method extractArrayFields

lib/Datasource/ExternalJson.php:199–202  ·  view source on GitHub ↗

* Extracts fields inside curly braces from the path string. */

(string $path)

Source from the content-addressed store, hash-verified

197 * Extracts fields inside curly braces from the path string.
198 */
199 private function extractArrayFields(string $path): array {
200 preg_match_all("/(?<={).*(?=})/", $path, $matches);
201 return $matches[0] ?? [];
202 }
203
204 /**
205 * If an absolute path precedes the array fields, extract the sub-array.

Callers 1

jsonParserMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected