public function extensions($extensions, $restrict = true)
{
$this->resetResults();
if (!is_null($this->extensionsToggle)) {
if ((bool) $restrict !== $this->extensionsToggle) {
throw new LogicException('You cannot restrict extensions AND exclude extension at the same time');
}
}
$this->extensionsToggle = (bool) $restrict;
$this->extensions = array_merge($this->extensions, (array) $extensions);
return $this;
}