• R/O
  • SSH
  • HTTPS

jinrousiki: Commit


Commit MetaInfo

Revision2673 (tree)
Time2020-06-27 22:07:30
Authorumethyl

Log Message

Loader::AutoLoad() Game, Vote 登録

Change Summary

Incremental Difference

--- trunk/include/loader_class.php (revision 2672)
+++ trunk/include/loader_class.php (revision 2673)
@@ -9,7 +9,11 @@
99 //-- 共通 --//
1010 //ライブラリロード
1111 final public static function Load($name) {
12- return (self::LoadFile($name) && self::LoadClass($name)) ? static::$class[$name] : null;
12+ if (true === self::LoadFile($name) && true === self::LoadClass($name)) {
13+ return static::$class[$name];
14+ } else {
15+ return null;
16+ }
1317 }
1418
1519 //依存解決処理
@@ -106,8 +110,6 @@
106110
107111 //初期化処理
108112 public static function Initialize() {
109- //self::LoadFile('db_class', 'server_config');
110-
111113 if (ServerConfig::DISPLAY_ERROR) { //エラー表示設定
112114 ini_set('display_errors', 'On');
113115 error_reporting(E_ALL);
@@ -144,7 +146,8 @@
144146 }
145147
146148 //-- ヘッダ強制指定 --//
147- if (ServerConfig::SET_HEADER_ENCODE && false === headers_sent()) { //ヘッダ未送信時にセットする
149+ //ヘッダ未送信時にセットする
150+ if (ServerConfig::SET_HEADER_ENCODE && false === headers_sent()) {
148151 header(sprintf('Content-type: text/html; charset=%s', ServerConfig::ENCODE));
149152 header('Content-Language: ja');
150153 }
@@ -153,7 +156,7 @@
153156 //オートロード
154157 public static function AutoLoad($name) {
155158 $file = self::GetFile($name);
156- if (is_null($file)) {
159+ if (true === is_null($file)) {
157160 throw new RuntimeException("AutoLoad failed: {$name}");
158161 } else {
159162 self::LoadFile($file);
@@ -246,20 +249,10 @@
246249 //config
247250 'server_config' => ['system_class', 'functions', 'room_class'], //常時ロード
248251 //function
249- //'room_class' => ['room_data_class', 'request_data_class'], //常時ロード
250- 'room_class' => [ //常時ロード (依存)
251- 'room_data_class', 'request_data_class', 'dead_reason_data_class',
252- 'vote_data_class'],
253- 'user_class' => ['game_functions'],
252+ 'room_class' => ['room_data_class', 'request_data_class'], //常時ロード
254253 'twitter_class' => ['twitter'],
255254 'paparazzi_class' => 'paparazzi',
256- 'game_vote_functions' => ['vote_group_data_class', 'role_vote_class', 'game_functions'],
257- //'test_functions' => ['game_vote_functions'],
258- //controller
259- 'game_vote_class' => ['game_vote_functions'],
260255 //controller/test
261- 'cast_test_class' => ['game_vote_functions'],
262- 'vote_test_class' => ['game_vote_functions'],
263256 'user_entry_test_class' => ['user_manager_class'],
264257 ];
265258
@@ -307,7 +300,7 @@
307300 'TwitterMessage' => 'twitter_message',
308301 'TestMessage' => 'test_message',
309302 //data
310- 'VoteAction' => 'vote_data_class',
303+ 'DeadReason' => 'dead_reason_data_class',
311304 //data/user
312305 'UserLive' => 'user_data_class',
313306 'UserMode' => 'user_data_class',
@@ -317,21 +310,20 @@
317310 'TalkVoice' => 'talk_data_class',
318311 'TalkElement' => 'talk_data_class',
319312 'TalkCSS' => 'talk_data_class',
313+ //data/camp
314+ 'BaseCamp' => 'camp_data_class',
315+ 'Camp' => 'camp_data_class',
316+ 'CampGroup' => 'camp_data_class',
317+ 'WinCamp' => 'camp_data_class',
320318 //data/role
321319 'RoleData' => 'role_data_class',
322320 'RoleSubData' => 'role_sub_data_class',
321+ 'RoleShortData' => 'role_short_data_class',
323322 'RoleGroupData' => 'role_group_data_class',
324323 'RoleGroupSubData' => 'role_group_sub_data_class',
325- 'RoleShortData' => 'role_short_data_class',
326- 'RoleGroupSubData' => 'role_group_sub_data_class',
327324 'RoleActionDate' => 'role_vote_data_class',
328325 'RoleAbility' => 'role_vote_data_class',
329326 'RoleFilterData' => 'role_filter_data_class',
330- //data/camp
331- 'BaseCamp' => 'camp_data_class',
332- 'Camp' => 'camp_data_class',
333- 'CampGroup' => 'camp_data_class',
334- 'WinCamp' => 'camp_data_class',
335327 //data/option
336328 'OptionGroup' => 'option_data_class',
337329 'OptionFormType' => 'option_data_class',
@@ -340,10 +332,21 @@
340332 'EventType' => 'event_data_class',
341333 'EventFilterData' => 'event_filter_data_class',
342334 'WeatherData' => 'weather_data_class',
335+ //date/vote
336+ 'VoteAction' => 'vote_data_class',
337+ 'VoteKickElement' => 'vote_data_class',
338+ 'VoteDayElement' => 'vote_data_class',
339+ 'VoteCSS' => 'vote_data_class',
340+ 'VoteActionGroup' => 'vote_group_data_class',
343341 //system
344342 'Cast' => 'cast_class',
345343 'PageLinkBuilder' => 'old_log_functions',
346344 'JinrouCacheManager' => 'cache_class',
345+ //system/game
346+ 'GameTime' => 'game_functions',
347+ 'Position' => 'game_functions',
348+ 'Objection' => 'game_functions',
349+ 'Winner' => 'game_functions',
347350 //system/user
348351 'User' => 'user_class',
349352 'UserLoader' => 'user_class',
@@ -389,9 +392,16 @@
389392 'RoleTalkStruct' => 'role_class',
390393 'RoleDataManager' => 'role_data_manager_class',
391394 'RoleUser' => 'role_user_class',
395+ 'RoleVote' => 'role_vote_class',
392396 //event
393397 'EventManager' => 'event_class',
394398 'WeatherManager' => 'weather_class',
399+ //vote
400+ 'VoteKick' => 'game_vote_functions',
401+ 'VoteDay' => 'game_vote_functions',
402+ 'VoteNight' => 'game_vote_functions',
403+ 'VoteHeaven' => 'game_vote_functions',
404+ 'VoteDummyBoy' => 'game_vote_functions',
395405 //controller/test
396406 'VoteTestController' => 'vote_test_class',
397407 //controller/message
Show on old repository browser