选择语言 :

 Module_Storage_Driver_Database::__construct

null Module_Storage_Driver_Database::__construct( )
File: ./modules/storage/driver/database.class.php
public function __construct($config_name = 'default')
{
    if (is_array($config_name))
    {
        $config = $config_name;
    }
    else
    {
        $config = Core::config('storage/database.'.$config_name);
    }

    $this->database  = $config['database'];
    $this->tablename = $config['tablename'];

    if (!$this->tablename)
    {
        throw new Exception(__('Database storage configuration error'));
    }

    $this->_handler = new Database(array('type'=>$config['type'], 'connection'=>$config));
}