<?php

//// This is the configuration for yiic console application.
//// Any writable CConsoleApplication properties can be configured here.

Yii::setPathOfAlias('bootstrap', dirname(__FILE__) . '/../extensions/bootstrap');
return array(
    'commandMap' => array(
        'eexcelview' => array(
            'class' => 'ext.eexcelview.EExcelBehavior',
        ),
    // other commands
    ),
    'basePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..',
    'name' => 'LSMS',
    // change application language from "en_us" (default value ) to "en"
    'sourceLanguage' => '00',
    'language' => 'en',
//     'timeZone'=>'Asia/Damascus',
    // preloading 'log' component
    'preload' => array('log'
        , 'bootstrap', // preload the bootstrap component version yii-bootstrap-2.0.3.r329
    ),
    // autoloading model and component classes
    'import' => array(
        'application.models.*',
        'application.components.*',
    ),
    'modules' => array(
        // uncomment the following to enable the Gii tool

        'gii' => array(
            'class' => 'system.gii.GiiModule',
            'password' => 'P@ssw0rd',
            // If removed, Gii defaults to localhost only. Edit carefully to taste.
            'ipFilters' => array('127.0.0.1', '::1'),
            'generatorPaths' => array(
                'bootstrap.gii',
            ),
        ),
    ),
    // application components
    'components' => array(
        'authManager' => array(
            'class' => 'CDbAuthManager',
            'connectionID' => 'db',
            'itemTable' => 'authitem',
            'assignmentTable' => 'authassignment',
            'itemChildTable' => 'authitemchild',
        ),
        'coreMessages' => array(
            'basePath' => null,
        ),
        'bootstrap' => array(
            'class' => 'bootstrap.components.Bootstrap', // assuming you extracted bootstrap under extensions
        ),
        'user' => array(
            // enable cookie-based authentication
            'class' => 'ConsoleUser',
        ),
        // uncomment the following to enable URLs in path-format
//        'urlManager' => array(
//            'urlFormat' => 'path',
//            'rules' => array(
//                '<controller:\w+>/<id:\d+>' => '<controller>/view',
//                '<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
//                '<controller:\w+>/<action:\w+>' => '<controller>/<action>',
//            ),
//        ),
        'db' => array(
            'class' => 'LSMSDbConnection',
//             'connectionString' => 'mysql:host=localhost;dbname=lsms',
            "driverName" => 'mysql',
            'host' => 'localhost',
            'dbname' => 'lsms',
            'emulatePrepare' => true,
            'username' => 'root',
            'password' => 'LSMS@2013!', // SLB
            'charset' => 'utf8',
            'tablePrefix' => '',
//             'initSQLs' => array("set time_zone='+05:00';"),
        ),
        'errorHandler' => array(
            // use 'site/error' action to display errors
            'errorAction' => 'site/error',
        ),
        'log' => array(
            'class' => 'CLogRouter',
            'routes' => array(
                array(
                    'class' => 'CFileLogRoute',
                    'levels' => 'error, warning, info',
//                    'filter'=>'CLogFilter',
                    'logFile' => 'consoleApplication.log'
                ),
            // uncomment the following to show log messages on web pages
            /*
              array(
              'class'=>'CWebLogRoute',
              ),
             */
            ),
        ),
    ),
    // application-level parameters that can be accessed
    // using Yii::app()->params['paramName']
    'params' => array(
        // this is used in contact page
          'email_user_name' => 'noreply-lsms@exchange.slb.com',
          'email_password' => 'ITIraq@2013!',
          'email_set_from_addres' => 'noreply-lsms@exchange.slb.com',
          'email_port' => 25,
          'email_host' => 'Nl0230exchub.mail.slb.com',
          'email_SMTPSecure' => '',
        //parameter for dump database to file
        'mysqldump_file_path' => 'C:/wamp/bin/mysql/mysql5.6.17/bin/',
        'pageSize' => '5',
        'numOfDigitsForCodes' => 6,
    ),
);