public function getCommandObject($command)
{
$which = ['System'];
$this->isAdmin() && ($which[] = 'Admin');
$which[] = 'User';
foreach ($which as $auth) {
$command_namespace = __NAMESPACE__ . '\\Commands\\' . $auth . 'Commands\\' . $this->ucfirstUnicode($command) . 'Command';
if (class_exists($command_namespace)) {
return new $command_namespace($this, $this->update);
}
}
return null;
}