Pop\Log\Writer\Mail::__construct PHP Метод

__construct() публичный Метод

Instantiate the Mail writer object.
public __construct ( array $emails ) : Mail
$emails array
Результат Mail
    public function __construct(array $emails)
    {
        if (count($emails) == 0) {
            throw new Exception('Error: There must be at least one email address passed.');
        }
        foreach ($emails as $key => $value) {
            if (!is_numeric($key)) {
                $this->emails[] = array('name' => $key, 'email' => $value);
            } else {
                $this->emails[] = array('email' => $value);
            }
        }
    }