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

Method matchReference

lib/Reference/ReferenceProvider.php:87–94  ·  view source on GitHub ↗
(string $referenceText)

Source from the content-addressed store, hash-verified

85 }
86
87 public function matchReference(string $referenceText): bool
88 {
89 $adminLinkPreviewEnabled = $this->config->getAppValue('analytics', 'link_preview_enabled', '1') === '1';
90 if (!$adminLinkPreviewEnabled) {
91 return false;
92 }
93 return preg_match('~/apps/analytics/(?:r/\d+(?:/(?:chart|table|content))?|pa/\d+(?:/content)?)(?:[?#].*)?$~', $referenceText) === 1;
94 }
95
96 public function resolveReference(string $referenceText): ?IReference
97 {

Callers 3

resolveReferenceMethod · 0.95
testMatchReferenceMethod · 0.80

Calls 1

getAppValueMethod · 0.80

Tested by 2

testMatchReferenceMethod · 0.64