@param Core $kernel

@return self
543418
public function unshift(Core $kernel)
    {
        $that = clone($this);
        array_unshift($that->middlewares, $kernel);

        return $that;
    }
77852
protected function setContext( KernelAwareContext $context )
    {
        $this->context = $context;
        $this->kernel = $context->getKernel();
    }
548040
public function setKernelMemory(int $kernelMemory)
    {
        $this->kernelMemory = $kernelMemory;

        $this->hostConfig = array_merge($this->hostConfig, ['KernelMemory' => $kernelMemory]);

        return $this;
    }
1306432
private function _kernel()
    {
        if (CommonFunctions::executeProgram('uname', '-s', $os, PSI_DEBUG) && ($os!="")) {
            if (CommonFunctions::executeProgram('uname', '-r', $version, PSI_DEBUG) && ($version!="")) {
                $os.=' '.$version;
            }
            if (CommonFunctions::executeProgram('uname', '-v', $subversion, PSI_DEBUG) && ($subversion!="")) {
                $os.=' ('.$subversion.')';
            }
            if (CommonFunctions::executeProgram('uname', '-i', $platform, PSI_DEBUG) && ($platform!="")) {
                $os.=' '.$platform;
            }
            $this->sys->setKernel($os);
        }
    }
969197
protected function buildKernel()
    {
        $this->app->singleton(
            Kernel::class,
            $this->getAppNamespace() . 'Ws\Kernel'
        );
        
        return $this->Kernel = $this->app->make(Kernel::class);
    }
432188
public static function fromResource(core_kernel_classes_Resource $resource) {
	    $values = $resource->getPropertiesValues(array(
			WfEngineOntology::PROPERTY_CALL_OF_SERVICES_SERVICE_DEFINITION,
			WfEngineOntology::PROPERTY_CALL_OF_SERVICES_ACTUAL_PARAMETER_IN,
			WfEngineOntology::PROPERTY_CALL_OF_SERVICES_ACTUAL_PARAMETER_OUT
	    ));
	    $serviceDefUri = current($values[WfEngineOntology::PROPERTY_CALL_OF_SERVICES_SERVICE_DEFINITION]);
	    $serviceCall = new self($serviceDefUri);
	    foreach ($values[WfEngineOntology::PROPERTY_CALL_OF_SERVICES_ACTUAL_PARAMETER_IN] as $inRes) {
	        $param = tao_models_classes_service_Parameter::fromResource($inRes);
	        $serviceCall->addInParameter($param);
	    }
	    if (!empty($values[WfEngineOntology::PROPERTY_CALL_OF_SERVICES_ACTUAL_PARAMETER_OUT])) {
	        $param = tao_models_classes_service_Parameter::fromResource(current($values[WfEngineOntology::PROPERTY_CALL_OF_SERVICES_ACTUAL_PARAMETER_OUT]));
	        $serviceCall->setOutParameter($param);
	    }
	    return $serviceCall;
	}
171121
public function getBundlesForKernels(array $kernels)
    {
        $bundles = array();
        foreach ($kernels as $name => $environments) {
            $environments = (array) $environments;
            foreach ($environments as $environment) {
                $kernel = $this->createKernel($name, $environment);
                $registeredBundles = array();
                foreach ($kernel->registerBundles() as $bundle) {
                    $registeredBundles[] = get_class($bundle);
                }
                $bundles = array_merge($bundles, $registeredBundles);
            }
        }

        return $bundles;
    }
1284371
public function setCoreFromVersion() {
    $core = '\Drupal\Driver\Cores\Drupal' . $this->getDrupalVersion();
    $this->core = new $core($this->drupalRoot, $this->uri);
  }
923644
protected function kernel()
    {
        $s = $this->grabkey('kern.version');
        $a = preg_split('/:/', $s);
        if (isset($a[2])) {
            $this->sys->setKernel($a[0].$a[1].':'.$a[2]);
        } else {
            $this->sys->setKernel($s);
        }
    }
570575
public static function core(Core $core = NULL)
    {
        if ($core)
        {
            static::$core = $core;
        }

        else if (static::$core === NULL)
        {
            static::init();
        }

        return static::$core;
    }
1184272
public function boot(Kernel $kernel)
    {
        $this->publishes([
            $this->configPath() => config_path('laravel-html-encrypt.php'),
        ]);

        if (config('laravel-html-encrypt.encrypt')) {
            $kernel->prependMiddleware('PhpJunior\LaravelHtmlEncrypt\Middleware\HtmlEncrypt');
        }
    }
607075
public function run(ContextInterface $context, callable $kernel)
    {
        if (empty($this->head)) {
            return $this->handleResult($context, call_user_func($kernel, $context));
        }

        $this->kernel = $kernel;

        /** @var callable $start */
        $start = $this->head;
        $context = $start($context);

        $this->kernel = null;

        return $context;
    }
435226
public function setSubClassOf( core_kernel_classes_Class $resource,  core_kernel_classes_Class $iClass)
    {
        $returnValue = (bool) false;

		$subClassOf = new core_kernel_classes_Property(OntologyRdfs::RDFS_SUBCLASSOF);
		$returnValue = $this->setPropertyValue($resource, $subClassOf, $iClass->getUri());

        return (bool) $returnValue;
    }
73134
public function setKernelOptions($kernelOptions)
    {
        $this->kernelOptions = $kernelOptions;

        //Convert root_dir to be relative to the resque bundle paths, this makes it possible to deploy workers in different places
        if (array_key_exists('kernel.root_dir', $this->kernelOptions)) {
            $this->kernelOptions['kernel.root_dir'] = $this->getRelativePath(__DIR__, $this->kernelOptions['kernel.root_dir']);
        }

        return $this;
    }
310101
protected function getDefaultApplication(IKernel $kernel = NULL) {
		if($kernel === NULL) {
			return new Application($this->getDefaultKernel(), $this->injector, new Router(""));
		}

		return new Application($kernel, $this->injector, new Router(""));
	}
402663
public function boot(Router $router, Kernel $kernel)
    {
        // add router middleware
        $globalMiddleware = [
            UploadChecks::class
        ];
        $routerMiddleware = [
            'coaster.admin' => AdminAuth::class,
            'coaster.guest' => GuestAuth::class,
            'coaster.secure_upload' => SecureUpload::class,
        ];
        event(new LoadMiddleware($globalMiddleware, $routerMiddleware));
        foreach ($globalMiddleware as $globalMiddlewareClass) {
            $kernel->pushMiddleware($globalMiddlewareClass);
        }
        foreach ($routerMiddleware as $routerMiddlewareName => $routerMiddlewareClass) {
            $router->middlewareGroup($routerMiddlewareName, [$routerMiddlewareClass]);
        }

        // use coater guard and user provider
        $authGuard = Helpers\Cms\CoasterGuard::class;
        $authUserProvider = Providers\CoasterAuthUserProvider::class;
        event(new LoadAuth($authGuard, $authUserProvider));
        if ($authGuard && $authUserProvider) {
            Auth::extend('coaster', function ($app) use ($authGuard, $authUserProvider) {
                $guard = new $authGuard(
                    'coasterguard',
                    new $authUserProvider($app['hash'], config('auth.providers.users.model')),
                    $app['session.store'],
                    $app['request']
                );

                // set cookie jar for cookies
                if (method_exists($guard, 'setCookieJar')) {
                    $guard->setCookieJar($this->app['cookie']);
                }
                if (method_exists($guard, 'setDispatcher')) {
                    $guard->setDispatcher($this->app['events']);
                }
                if (method_exists($guard, 'setRequest')) {
                    $guard->setRequest($this->app->refresh('request', $guard, 'setRequest'));
                }

                return $guard;
            });
        }

        // load coaster views
        $adminViews = [
            base_path(trim(config('coaster::admin.view'), '/'))
        ];
        $frontendViews = [
            base_path(trim(config('coaster::frontend.view'), '/'))
        ];
        event(new SetViewPaths($adminViews, $frontendViews));
        $this->loadViewsFrom($adminViews, 'coaster');
        $this->loadViewsFrom($frontendViews, 'coasterCms');

        $this->app->singleton('formMessage', function () {
            return new FormMessage($this->app['session'], 'default', config('coaster::frontend.form_error_class'));
        });
    }
1251665
public function manageAdmin(string $kernel, $request)
    {
        if (! $this->isWordPressAdmin() && ! $this->has('action')) {
            return $this;
        }

        $this['action']->add('admin_init', $this->dispatchToAdmin($kernel, $request));

        return $this;
    }