Ejemplo n.º 1
0
 public static function init(WordPress\App $app)
 {
     // Find the Composer ClassLoader instance
     foreach (spl_autoload_functions() as $callable) {
         if (is_array($callable)) {
             if ($callable[0] instanceof Composer\Autoload\ClassLoader) {
                 $app->setShared('autoloader', $callable[0]);
                 break;
             }
         }
     }
     $app->setShared('app', $app);
     self::$app = $app;
 }