public function useTheme($stylesheet, $template = null, $themeName = null)
{
if (!is_string($stylesheet)) {
throw new \InvalidArgumentException('Stylesheet must be a string');
}
if (!(is_string($template) || is_null($template))) {
throw new \InvalidArgumentException('Template must either be a string or be null.');
}
if (!(is_string($themeName) || is_null($themeName))) {
throw new \InvalidArgumentException('Current Theme must either be a string or be null.');
}
$template = $template ?: $stylesheet;
$themeName = $themeName ?: ucwords($stylesheet, " _");
$this->haveOptionInDatabase('stylesheet', $stylesheet);
$this->haveOptionInDatabase('template', $template);
$this->haveOptionInDatabase('current_theme', $themeName);
$this->stylesheet = $stylesheet;
$this->menus[$stylesheet] = empty($this->menus[$stylesheet]) ? [] : $this->menus[$stylesheet];
}