コード例 #1
0
ファイル: Mail.php プロジェクト: rukzuk/rukzuk
 /**
  * Legt die speziellen Settings fuer den (Zend) File-Transporter fest
  *
  * @param \Zend_Mail_Transport_Abstract $transporter
  */
 protected function setTransporterFileSettings(\Zend_Mail_Transport_File $transporter)
 {
     $options = array();
     if (isset($this->getConfig()->file) && isset($this->getConfig()->file->path)) {
         $options['path'] = $this->getConfig()->file->path;
     }
     $transporter->setOptions($options);
 }
コード例 #2
0
ファイル: File.php プロジェクト: rukzuk/rukzuk
 /**
  * Sets options
  *
  * @param  array $options
  * @return void
  */
 public function setOptions(array $options)
 {
     // Verzeichnis erstellen, wenn nicht vorhanden ist
     if (isset($options['path']) && !is_dir($options['path'])) {
         $mkDirSuccess = mkdir($options['path']);
         if (!$mkDirSuccess) {
             throw new \Zend_Mail_Transport_Exception(sprintf('Can not create directory "%s"', $options['path']));
         }
     }
     parent::setOptions($options);
 }