@@ -44,50 +44,71 @@ class App extends BaseContainer
4444
4545 public $ release ;
4646
47+ public $ requiredAge ;
48+
49+ public $ isFree ;
50+
51+ public $ shortDescription ;
52+
53+ public $ supportedLanguages ;
54+
55+ public $ recommendations ;
56+
57+ public $ achievements ;
58+
59+ public $ dlc ;
60+
4761 public function __construct ($ app )
4862 {
49- $ this ->id = $ app ->steam_appid ;
50- $ this ->type = $ app ->type ;
51- $ this ->name = $ app ->name ;
52- $ this ->controllerSupport = $ this ->checkIssetField ($ app , 'controller_support ' , 'None ' );
53- $ this ->description = $ app ->detailed_description ;
54- $ this ->about = $ app ->about_the_game ;
55- $ this ->fullgame = $ this ->checkIssetField ($ app , 'fullgame ' , $ this ->getFakeFullgameObject ());
56- $ this ->header = $ app ->header_image ;
57- $ this ->website = $ this ->checkIsNullField ($ app , 'website ' , 'None ' );
58- $ this ->pcRequirements = $ app ->pc_requirements ;
59- $ this ->legal = $ this ->checkIssetField ($ app , 'legal_notice ' , 'None ' );
60- $ this ->developers = $ this ->checkIssetCollection ($ app , 'developers ' );
61- $ this ->publishers = new Collection ($ app ->publishers );
62- $ this ->price = $ this ->checkIssetField ($ app , 'price_overview ' , $ this ->getFakePriceObject ());
63- $ this ->platforms = $ app ->platforms ;
64- $ this ->metacritic = $ this ->checkIssetField ($ app , 'metacritic ' , $ this ->getFakeMetacriticObject ());
65- $ this ->categories = $ this ->checkIssetCollection ($ app , 'categories ' );
66- $ this ->genres = $ this ->checkIssetCollection ($ app , 'genres ' );
67- $ this ->release = $ app ->release_date ;
63+
64+ $ this ->id = $ app ->steam_appid ;
65+ $ this ->type = $ app ->type ;
66+ $ this ->name = $ app ->name ;
67+ $ this ->controllerSupport = $ this ->checkIssetField ($ app , 'controller_support ' , 'None ' );
68+ $ this ->description = $ app ->detailed_description ;
69+ $ this ->about = $ app ->about_the_game ;
70+ $ this ->fullgame = $ this ->checkIssetField ($ app , 'fullgame ' , $ this ->getFakeFullgameObject ());
71+ $ this ->header = $ app ->header_image ;
72+ $ this ->website = $ this ->checkIsNullField ($ app , 'website ' , 'None ' );
73+ $ this ->pcRequirements = $ app ->pc_requirements ;
74+ $ this ->legal = $ this ->checkIssetField ($ app , 'legal_notice ' , 'None ' );
75+ $ this ->developers = $ this ->checkIssetCollection ($ app , 'developers ' );
76+ $ this ->publishers = new Collection ($ app ->publishers );
77+ $ this ->price = $ this ->checkIssetField ($ app , 'price_overview ' , $ this ->getFakePriceObject ());
78+ $ this ->platforms = $ app ->platforms ;
79+ $ this ->metacritic = $ this ->checkIssetField ($ app , 'metacritic ' , $ this ->getFakeMetacriticObject ());
80+ $ this ->categories = $ this ->checkIssetCollection ($ app , 'categories ' );
81+ $ this ->genres = $ this ->checkIssetCollection ($ app , 'genres ' );
82+ $ this ->release = $ app ->release_date ;
83+ $ this ->requiredAge = (int )$ app ->required_age ;
84+ $ this ->isFree = $ app ->is_free ;
85+ $ this ->shortDescription = $ app ->short_description ;
86+ $ this ->supportedLanguages = $ app ->supported_languages ;
87+ $ this ->recommendations = $ app ->recommendations ;
88+ $ this ->achievements = $ app ->achievements ;
89+ $ this ->dlc = $ this ->checkIssetCollection ($ app , 'dlc ' );
90+
6891 }
6992
7093 protected function getFakeMetacriticObject ()
7194 {
7295 $ object = new \stdClass ();
7396 $ object ->url = null ;
7497 $ object ->score = 'No Score ' ;
75-
7698 return $ object ;
7799 }
78100
79101 protected function getFakePriceObject ()
80102 {
81103 $ object = new \stdClass ();
82104 $ object ->final = 'No price found ' ;
83-
84105 return $ object ;
85106 }
86107
87108 protected function getFakeFullgameObject ()
88109 {
89- $ object = new \stdClass ();
110+ $ object = new \stdClass ();
90111 $ object ->appid = null ;
91- $ object ->name = 'No parent game found ' ;
112+ $ object ->name = 'No parent game found ' ;
92113 }
93114}
0 commit comments