/home/techb158/ileadtechnology.com/vendor/spatie/robots-txt/src
Edit: /home/techb158/ileadtechnology.com/vendor/spatie/robots-txt/src/RobotsMeta.php (1741B)
robotsMetaTagProperties = $this->findRobotsMetaTagProperties($html);
}
public function mayIndex(): bool
{
return ! $this->noindex();
}
public function mayFollow(): bool
{
return ! $this->nofollow();
}
public function noindex(): bool
{
return $this->robotsMetaTagProperties['noindex'] ?? false;
}
public function nofollow(): bool
{
return $this->robotsMetaTagProperties['nofollow'] ?? false;
}
protected function findRobotsMetaTagProperties(string $html): array
{
$metaTagLine = $this->findRobotsMetaTagLine($html);
return [
'noindex' => $metaTagLine
? strpos(strtolower($metaTagLine), 'noindex') !== false
: false,
'nofollow' => $metaTagLine
? strpos(strtolower($metaTagLine), 'nofollow') !== false
: false,
];
}
protected function findRobotsMetaTagLine(string $html): ?string
{
if (preg_match('/\
/mis', $html, $matches)) {
return $matches[0];
}
return null;
}
}