web/lib/Zend/Mail/Transport/File.php
changeset 807 877f952ae2bd
parent 207 621fa6caec0c
child 1230 68c69c656a2c
equal deleted inserted replaced
805:5e7a0fedabdf 807:877f952ae2bd
    13  * to license@zend.com so we can send you a copy immediately.
    13  * to license@zend.com so we can send you a copy immediately.
    14  *
    14  *
    15  * @category   Zend
    15  * @category   Zend
    16  * @package    Zend_Mail
    16  * @package    Zend_Mail
    17  * @subpackage Transport
    17  * @subpackage Transport
    18  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    18  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    19  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    19  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    20  * @version    $Id$
    20  * @version    $Id$
    21  */
    21  */
    22 
    22 
    23 /**
    23 /**
    32  * Class for saving outgoing emails in filesystem
    32  * Class for saving outgoing emails in filesystem
    33  *
    33  *
    34  * @category   Zend
    34  * @category   Zend
    35  * @package    Zend_Mail
    35  * @package    Zend_Mail
    36  * @subpackage Transport
    36  * @subpackage Transport
    37  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    37  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    38  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    38  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    39  */
    39  */
    40 class Zend_Mail_Transport_File extends Zend_Mail_Transport_Abstract
    40 class Zend_Mail_Transport_File extends Zend_Mail_Transport_Abstract
    41 {
    41 {
    42     /**
    42     /**
    84      * @param  array $options
    84      * @param  array $options
    85      * @return void
    85      * @return void
    86      */
    86      */
    87     public function setOptions(array $options)
    87     public function setOptions(array $options)
    88     {
    88     {
    89         if (isset($options['path'])&& is_dir($options['path'])) {
    89         if (isset($options['path']) && is_dir($options['path'])) {
    90             $this->_path = $options['path'];
    90             $this->_path = $options['path'];
    91         }
    91         }
    92         if (isset($options['callback']) && is_callable($options['callback'])) {
    92         if (isset($options['callback']) && is_callable($options['callback'])) {
    93             $this->_callback = $options['callback'];
    93             $this->_callback = $options['callback'];
    94         }
    94         }
   125      * Default callback for generating filenames
   125      * Default callback for generating filenames
   126      *
   126      *
   127      * @param Zend_Mail_Transport_File File transport instance
   127      * @param Zend_Mail_Transport_File File transport instance
   128      * @return string
   128      * @return string
   129      */
   129      */
   130     public function defaultCallback($transport) 
   130     public function defaultCallback($transport)
   131     {
   131     {
   132         return 'ZendMail_' . $_SERVER['REQUEST_TIME'] . '_' . mt_rand() . '.tmp';
   132         return 'ZendMail_' . $_SERVER['REQUEST_TIME'] . '_' . mt_rand() . '.tmp';
   133     }
   133     }
   134 }
   134 }