protected function getInspectorConfiguration($type)
{
$configString = $this->getTag('inspector') ? $this->getTag('inspector') : $this->getTag('inspector:jump');
if (!$configString) {
return false;
}
$tagPairs = explode(',', $configString);
$config = [];
foreach ($tagPairs as $tagPair) {
list($key, $value) = explode(':', $tagPair);
$config[trim($key)] = trim($value);
}
if ($type == 'user') {
return isset($config['User']) ? $config['User'] : false;
}
if ($type == 'jumptags') {
if (isset($config['User'])) {
unset($config['User']);
}
return count($config) ? $config : false;
}
throw new \InvalidArgumentException("Invalid type: {$type}");
}