src/email/EmailBuilder.php
protected function validateEmailer()
    {
        if ($this->emailer === null) {
            $settingsInstance = $this->getSettingsInstance();

            $writerClasses = $settingsInstance->getDefaultEmailWriterClasses();
            $emailerClass = $settingsInstance->getDefaultEmailerClass();

            $writerInstances = [];
            foreach ($writerClasses as $writerClass) {
                $writerInstances[] = new $writerClass();
            }

            $this->emailer = new $emailerClass($writerInstances);
        }
    }
protected function validateEmailer()
    {
        if ($this->emailer === null) {
            $settingsInstance = $this->getSettingsInstance();

            $writerClasses = $settingsInstance->getDefaultEmailWriterClasses();
            $emailerClass = $settingsInstance->getDefaultEmailerClass();

            $writerInstances = [];
            foreach ($writerClasses as $writerClass) {
                $writerInstances[] = new $writerClass();
            }

            $this->emailer = new $emailerClass($writerInstances);
        }
    }
protected function validateEmailer ( ) { if ( $ this -> emailer === null ) { $ settingsInstance = $ this -> getSettingsInstance ( ) ; $ writerClasses = $ settingsInstance -> getDefaultEmailWriterClasses ( ) ; $ emailerClass = $ settingsInstance -> getDefaultEmailerClass ( ) ; $ writerInstances = [ ] ; foreach ( $ writerClasses as $ writerClass ) { $ writerInstances [ ] = new $ writerClass ( ) ; } $ this -> emailer = new $ emailerClass ( $ writerInstances ) ; } }
Construct a emailer from setting defaults, if none has been provided.

@return void
Construct a emailer from setting defaults if none has been provided .