File tree Expand file tree Collapse file tree 1 file changed +14
-15
lines changed
Expand file tree Collapse file tree 1 file changed +14
-15
lines changed Original file line number Diff line number Diff line change 1515 * limitations under the License.
1616 */
1717
18- spl_autoload_register (
19- function ($ className ) {
20- $ classPath = explode ('_ ' , $ className );
21- if ($ classPath [0 ] != 'Google ' ) {
22- return ;
23- }
24- // Drop 'Google', and maximum class file path depth in this project is 3.
25- $ classPath = array_slice ($ classPath , 1 , 2 );
26-
27- $ filePath = dirname (__FILE__ ) . '/ ' . implode ('/ ' , $ classPath ) . '.php ' ;
28- if (file_exists ($ filePath )) {
29- require_once ($ filePath );
30- }
31- }
32- );
18+ function google_api_php_client_autoload ($ className )
19+ {
20+ $ classPath = explode ('_ ' , $ className );
21+ if ($ classPath [0 ] != 'Google ' ) {
22+ return ;
23+ }
24+ // Drop 'Google', and maximum class file path depth in this project is 3.
25+ $ classPath = array_slice ($ classPath , 1 , 2 );
26+ $ filePath = dirname (__FILE__ ) . '/ ' . implode ('/ ' , $ classPath ) . '.php ' ;
27+ if (file_exists ($ filePath )) {
28+ require_once ($ filePath );
29+ }
30+ }
31+ spl_autoload_register ('google_api_php_client_autoload ' );
You can’t perform that action at this time.
0 commit comments