public function __construct($logs) { setlocale(LC_ALL, 'en_US.UTF8'); $this->clients = new ArrayCollection(); if (count($logs) == 0) { throw new NoLogsConfiguredException(); } foreach ($logs as $client_name => $client_logs) { if (count($client_logs) > 0) { $client = new Client($client_name); foreach ($client_logs as $log_name => $args) { $client->addLog(new LogFile($log_name, $client->getSlug(), $args)); } $this->clients->add($client); } } }