質問編集履歴

1

autload_real.phpのコードを掲載

2021/05/25 02:01

投稿

takuyaKK
takuyaKK

スコア37

test CHANGED
File without changes
test CHANGED
@@ -17,3 +17,161 @@
17
17
  と書いても変わらないような気がするのですが、実際にやると上手くautloadできないようです。
18
18
 
19
19
  どういった原因があるのでしょうか?
20
+
21
+
22
+
23
+ ```autload_real.php
24
+
25
+ <?php
26
+
27
+
28
+
29
+ // autoload_real.php @generated by Composer
30
+
31
+
32
+
33
+ class ComposerAutoloaderInitbaf0960fd667a299f3f264c39b8ee711
34
+
35
+ {
36
+
37
+ private static $loader;
38
+
39
+
40
+
41
+ public static function loadClassLoader($class)
42
+
43
+ {
44
+
45
+ if ('Composer\Autoload\ClassLoader' === $class) {
46
+
47
+ require __DIR__ . '/ClassLoader.php';
48
+
49
+ }
50
+
51
+ }
52
+
53
+
54
+
55
+ /**
56
+
57
+ * @return \Composer\Autoload\ClassLoader
58
+
59
+ */
60
+
61
+ public static function getLoader()
62
+
63
+ {
64
+
65
+ if (null !== self::$loader) {
66
+
67
+ return self::$loader;
68
+
69
+ }
70
+
71
+
72
+
73
+ require __DIR__ . '/platform_check.php';
74
+
75
+
76
+
77
+ spl_autoload_register(array('ComposerAutoloaderInitbaf0960fd667a299f3f264c39b8ee711', 'loadClassLoader'), true, true);
78
+
79
+ self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
80
+
81
+ spl_autoload_unregister(array('ComposerAutoloaderInitbaf0960fd667a299f3f264c39b8ee711', 'loadClassLoader'));
82
+
83
+
84
+
85
+ $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
86
+
87
+ if ($useStaticLoader) {
88
+
89
+ require __DIR__ . '/autoload_static.php';
90
+
91
+
92
+
93
+ call_user_func(\Composer\Autoload\ComposerStaticInitbaf0960fd667a299f3f264c39b8ee711::getInitializer($loader));
94
+
95
+ } else {
96
+
97
+ $map = require __DIR__ . '/autoload_namespaces.php';
98
+
99
+ foreach ($map as $namespace => $path) {
100
+
101
+ $loader->set($namespace, $path);
102
+
103
+ }
104
+
105
+
106
+
107
+ $map = require __DIR__ . '/autoload_psr4.php';
108
+
109
+ foreach ($map as $namespace => $path) {
110
+
111
+ $loader->setPsr4($namespace, $path);
112
+
113
+ }
114
+
115
+
116
+
117
+ $classMap = require __DIR__ . '/autoload_classmap.php';
118
+
119
+ if ($classMap) {
120
+
121
+ $loader->addClassMap($classMap);
122
+
123
+ }
124
+
125
+ }
126
+
127
+
128
+
129
+ $loader->register(true);
130
+
131
+
132
+
133
+ if ($useStaticLoader) {
134
+
135
+ $includeFiles = Composer\Autoload\ComposerStaticInitbaf0960fd667a299f3f264c39b8ee711::$files;
136
+
137
+ } else {
138
+
139
+ $includeFiles = require __DIR__ . '/autoload_files.php';
140
+
141
+ }
142
+
143
+ foreach ($includeFiles as $fileIdentifier => $file) {
144
+
145
+ composerRequirebaf0960fd667a299f3f264c39b8ee711($fileIdentifier, $file);
146
+
147
+ }
148
+
149
+
150
+
151
+ return $loader;
152
+
153
+ }
154
+
155
+ }
156
+
157
+
158
+
159
+ function composerRequirebaf0960fd667a299f3f264c39b8ee711($fileIdentifier, $file)
160
+
161
+ {
162
+
163
+ if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
164
+
165
+ require $file;
166
+
167
+
168
+
169
+ $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
170
+
171
+ }
172
+
173
+ }
174
+
175
+
176
+
177
+ ```