Skip to content

Commit

Permalink
API Refactor AppKernel into CoreKernel
Browse files Browse the repository at this point in the history
  • Loading branch information
Damian Mooyman committed Jun 20, 2017
1 parent f7946ae commit d88d4ed
Show file tree
Hide file tree
Showing 14 changed files with 441 additions and 462 deletions.
4 changes: 2 additions & 2 deletions cli-script.php
Expand Up @@ -2,7 +2,7 @@

// CLI specific bootstrapping
use SilverStripe\Control\CLIRequestBuilder;
use SilverStripe\Core\AppKernel;
use SilverStripe\Core\CoreKernel;
use SilverStripe\Core\HTTPApplication;

require __DIR__ . '/src/includes/autoload.php';
Expand All @@ -17,7 +17,7 @@
$request = CLIRequestBuilder::createFromEnvironment();

// Default application
$kernel = new AppKernel(BASE_PATH);
$kernel = new CoreKernel(BASE_PATH);
$app = new HTTPApplication($kernel);
$response = $app->handle($request);
$response->output();
15 changes: 5 additions & 10 deletions docs/en/02_Developer_Guides/08_Performance/05_Resource_Usage.md
Expand Up @@ -19,16 +19,11 @@ resources are required temporarily. In general, we recommend running resource in
[command line](../cli), where configuration defaults for these settings are higher or even unlimited.

<div class="info" markdown="1">
SilverStripe can request more resources through `increase_memory_limit_to()` and `increase_time_limit_to()` functions.
SilverStripe can request more resources through `Environment::increaseMemoryLimitTo()` and
`Environment::increaseTimeLimitTo()` functions.
</div>

:::php
function myBigFunction() {
increase_time_limit_to(400);

// or..
set_increase_time_limit_max();

// ..
}
public function myBigFunction() {
Environment::increaseTimeLimitTo(400);
}
4 changes: 2 additions & 2 deletions main.php
@@ -1,7 +1,7 @@
<?php

use SilverStripe\Control\HTTPRequestBuilder;
use SilverStripe\Core\AppKernel;
use SilverStripe\Core\CoreKernel;
use SilverStripe\Core\HTTPApplication;
use SilverStripe\Core\Startup\ErrorControlChainMiddleware;

Expand All @@ -11,7 +11,7 @@
$request = HTTPRequestBuilder::createFromEnvironment();

// Default application
$kernel = new AppKernel(BASE_PATH);
$kernel = new CoreKernel(BASE_PATH);
$app = new HTTPApplication($kernel);
$app->addMiddleware(new ErrorControlChainMiddleware($app));
$response = $app->handle($request);
Expand Down

0 comments on commit d88d4ed

Please sign in to comment.