OSDN Git Service

初回コミット(v2.6.17.1)
[magic3/magic3.git] / widgets / default_content / include / container / default_contentBaseWidgetContainer.php
1 <?php
2 /**
3  * index.php用コンテナクラス
4  *
5  * PHP versions 5
6  *
7  * LICENSE: This source file is licensed under the terms of the GNU General Public License.
8  *
9  * @package    Magic3 Framework
10  * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
11  * @copyright  Copyright 2006-2012 Magic3 Project.
12  * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
13  * @version    SVN: $Id: default_contentBaseWidgetContainer.php 5134 2012-08-23 05:57:47Z fishbone $
14  * @link       http://www.magic3.org
15  */
16 require_once($gEnvManager->getContainerPath() . '/baseWidgetContainer.php');
17 require_once($gEnvManager->getWidgetContainerPath('default_content') . '/default_contentCommonDef.php');
18 require_once($gEnvManager->getWidgetDbPath('default_content') . '/default_contentDb.php');
19
20 class default_contentBaseWidgetContainer extends BaseWidgetContainer
21 {
22         protected static $_mainDb;                      // DB接続オブジェクト
23         protected static $_configArray;         // 汎用コンテンツ定義値
24         protected $_langId;                     // 現在の言語
25         protected $_userId;                     // 現在のユーザ
26         protected $_isMultiLang;                        // 多言語対応画面かどうか
27         
28         /**
29          * コンストラクタ
30          */
31         function __construct()
32         {
33                 // 親クラスを呼び出す
34                 parent::__construct();
35                 
36                 // 代替処理用のウィジェットIDを設定
37                 $this->setDefaultWidgetId(default_contentCommonDef::CONTENT_WIDGET_ID);
38                 
39                 // DBオブジェクト作成
40                 if (!isset(self::$_mainDb)) self::$_mainDb = new default_contentDb();
41                 
42                 // 汎用コンテンツ定義を読み込む
43                 if (!isset(self::$_configArray)) self::$_configArray = default_contentCommonDef::loadConfig(self::$_mainDb);
44                 
45                 $this->_langId = $this->gEnv->getCurrentLanguage();                     // 現在の言語
46                 $this->_userId = $this->gEnv->getCurrentUserId();               // 現在のユーザ
47                 $this->_isMultiLang = $this->gEnv->isMultiLanguageSite();                       // 多言語対応画面かどうか
48         }
49 }
50 ?>