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

Method import

lib/Service/BundleImportService.php:29–35  ·  view source on GitHub ↗
(?string $path = null, ?string $raw = null)

Source from the content-addressed store, hash-verified

27 ) {}
28
29 public function import(?string $path = null, ?string $raw = null): int|array {
30 if ($path !== null && $path !== '') $raw = $this->rootFolder->getUserFolder($this->userId)->get($path)->getContent();
31 if ($raw === null) return 0;
32 $data = json_decode($raw, true);
33 if (is_array($data) && array_key_exists('format', $data)) return $this->importBundle($data);
34 return $this->reports->import(null, $raw);
35 }
36
37 public function installDemo(): array {
38 $key = 'analytics-demo-' . $this->userId;

Callers

nothing calls this directly

Calls 4

importBundleMethod · 0.95
getContentMethod · 0.80
getUserFolderMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected