@@ -67,7 +67,7 @@ |
||
67 | 67 | if (is_callable($callable)) { |
68 | 68 | $this->accessors[$varName][$type] = $callable; |
69 | 69 | } else { |
70 | - throw new \Exception('Error assigning callable in ' . get_called_class() . '! Callable typed [' . $type . '] is not a callable or not accessible in the scope'); |
|
70 | + throw new \Exception('Error assigning callable in '.get_called_class().'! Callable typed ['.$type.'] is not a callable or not accessible in the scope'); |
|
71 | 71 | } |
72 | 72 | } |
73 | 73 |
@@ -34,56 +34,56 @@ |
||
34 | 34 | $gc = $this; |
35 | 35 | |
36 | 36 | // Default db |
37 | - $gc->db = function ($c) { |
|
37 | + $gc->db = function($c) { |
|
38 | 38 | classSupernova::$db = $db = new \db_mysql($c); |
39 | 39 | $db->sn_db_connect(); |
40 | 40 | |
41 | 41 | return $db; |
42 | 42 | }; |
43 | 43 | |
44 | - $gc->debug = function ($c) { |
|
44 | + $gc->debug = function($c) { |
|
45 | 45 | return new \debug(); |
46 | 46 | }; |
47 | 47 | |
48 | - $gc->types = function ($c) { |
|
48 | + $gc->types = function($c) { |
|
49 | 49 | return new \Common\Types(); |
50 | 50 | }; |
51 | 51 | |
52 | - $gc->cache = function ($c) { |
|
52 | + $gc->cache = function($c) { |
|
53 | 53 | return new \classCache(classSupernova::$cache_prefix); |
54 | 54 | }; |
55 | 55 | |
56 | - $gc->config = function ($c) { |
|
56 | + $gc->config = function($c) { |
|
57 | 57 | return new \classConfig(classSupernova::$cache_prefix); |
58 | 58 | }; |
59 | 59 | |
60 | - $gc->localePlayer = function (GlobalContainer $c) { |
|
60 | + $gc->localePlayer = function(GlobalContainer $c) { |
|
61 | 61 | return new \classLocale($c->config->server_locale_log_usage); |
62 | 62 | }; |
63 | 63 | |
64 | - $gc->dbGlobalRowOperator = function (GlobalContainer $c) { |
|
64 | + $gc->dbGlobalRowOperator = function(GlobalContainer $c) { |
|
65 | 65 | return new \DbRowDirectOperator($c->db); |
66 | 66 | }; |
67 | 67 | |
68 | - $gc->query = $gc->factory(function (GlobalContainer $c) { |
|
68 | + $gc->query = $gc->factory(function(GlobalContainer $c) { |
|
69 | 69 | return new \DbQueryConstructor($c->db); |
70 | 70 | }); |
71 | 71 | |
72 | - $gc->cacheOperator = function (GlobalContainer $gc) { |
|
72 | + $gc->cacheOperator = function(GlobalContainer $gc) { |
|
73 | 73 | return new \SnDbCachedOperator($gc); |
74 | 74 | }; |
75 | 75 | |
76 | 76 | $gc->snCacheClass = 'SnCache'; |
77 | - $gc->snCache = function (GlobalContainer $gc) { |
|
77 | + $gc->snCache = function(GlobalContainer $gc) { |
|
78 | 78 | return $gc->db->snCache; |
79 | 79 | }; |
80 | 80 | |
81 | 81 | $gc->buddyClass = 'Buddy\BuddyModel'; |
82 | - $gc->buddyModel = function (GlobalContainer $c) { |
|
82 | + $gc->buddyModel = function(GlobalContainer $c) { |
|
83 | 83 | return new $c->buddyClass($c); |
84 | 84 | }; |
85 | 85 | |
86 | - $gc->unitModel = function (GlobalContainer $c) { |
|
86 | + $gc->unitModel = function(GlobalContainer $c) { |
|
87 | 87 | return new \V2Unit\V2UnitModel($c); |
88 | 88 | }; |
89 | 89 | } |