Changeset 21262

Show
Ignore:
Timestamp:
10/13/08 22:43:08 (5 years ago)
Author:
heavenshell
Message:

Modify comments.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • events/phpframework/zend_framework/trunk/app/Init.php

    r15805 r21262  
    2626 * @version $id$ 
    2727 * @copyright 2008 Heavens hell 
    28  * @author Heavens hell <heavenshell@heavenshell.jp> 
     28 * @author Heavens hell <heavenshell.jp@gmail.com> 
    2929 * @license New BSD License 
    3030 */ 
     
    118118            ->_loadLayoutSetting() 
    119119            ->_loadPaths() 
    120             ->_loadDbAdapter(); 
     120            ->_loadDbAdapter() 
     121            ->_loadMailConfig(); 
    121122 
    122123        return $this; 
     
    299300            return $config->toArray(); 
    300301        } 
     302 
    301303        return $config; 
    302304    } 
     
    312314    { 
    313315        $appPath = $this->_getParam('appPath'); 
    314         $file = $appPath . 'configs' . DIRECTORY_SEPARATOR . 'core.ini'; 
     316        $file    = $appPath . 'configs' . DIRECTORY_SEPARATOR . 'core.ini'; 
    315317        if (!file_exists($file)) { 
    316318            throw new Zend_Config_Exception('Could not load configs.ini.'); 
     
    346348        } 
    347349        $logDir = rtrim($logDir, '/\\') . DIRECTORY_SEPARATOR; 
     350 
    348351        $this->_setParam('rootDir', $rootDir); 
    349352        $this->_setParam('cacheDir', $cacheDir); 
     
    423426 
    424427    /** 
     428     * Load mail config 
     429     * 
     430     * @access private 
     431     * @return Init 
     432     * @throws Zend_Config_Exception 
     433     */ 
     434    private function _loadMailConfig() 
     435    { 
     436        $appPath    = $this->_getParam('appPath'); 
     437        $file       = $appPath . 'configs' . DIRECTORY_SEPARATOR . 'mail.ini'; 
     438        $mailConfig = null; 
     439        if (file_exists($file)) { 
     440            $mailConfig = $this->_loadConfig($file, $this->_getParam('envMode')); 
     441        } 
     442        $this->_setParam('mailConfig', $mailConfig); 
     443 
     444        return $this; 
     445    } 
     446 
     447    /** 
    425448     * Create plugin objects 
    426449     * 
     
    487510        } 
    488511 
    489         // Default settings.  
     512        // Default settings. 
    490513        $router->removeDefaultRoutes(); 
    491514        if (is_array($this->_modules)) { 
     
    544567            $router = $front->getRouter(); 
    545568            $this->_initRoute($router, $defaultModule); 
    546  
    547569            $front->setDefaultModule($defaultModule) 
    548570                ->addModuleDirectory($this->_getParam('moduleDir'))