Add proper bootstrap for kernels for web and console app.

This commit is contained in:
Taylor Dondich
2017-07-28 06:14:34 -07:00
committed by davidcallizaya
parent 0ccae19bd4
commit de1346aa96
3 changed files with 10 additions and 1 deletions

View File

@@ -1,9 +1,14 @@
#!/usr/bin/env php #!/usr/bin/env php
<?php <?php
use Illuminate\Foundation\Console\Kernel;
// Because laravel has a __ helper function, it's important we include the class.g file to ensure our __ is used. // Because laravel has a __ helper function, it's important we include the class.g file to ensure our __ is used.
require_once __DIR__.'/gulliver/system/class.g.php'; require_once __DIR__.'/gulliver/system/class.g.php';
require_once __DIR__.'/bootstrap/autoload.php'; require_once __DIR__.'/bootstrap/autoload.php';
require_once __DIR__.'/bootstrap/app.php'; $scriptDir = dirname(__FILE__).'/'; require_once __DIR__.'/bootstrap/app.php';
$app->make(Kernel::class)->bootstrap();
$scriptDir = dirname(__FILE__).'/';
define("PROCESSMAKER_PATH", $scriptDir); define("PROCESSMAKER_PATH", $scriptDir);
define("WORKFLOW_PATH", $scriptDir . 'workflow/'); define("WORKFLOW_PATH", $scriptDir . 'workflow/');

View File

View File

@@ -1,8 +1,12 @@
<?php <?php
use Illuminate\Foundation\Http\Kernel;
// Because laravel has a __ helper function, it's important we include the class.g file to ensure our __ is used. // Because laravel has a __ helper function, it's important we include the class.g file to ensure our __ is used.
require_once __DIR__.'/../../gulliver/system/class.g.php'; require_once __DIR__.'/../../gulliver/system/class.g.php';
require_once __DIR__.'/../../bootstrap/autoload.php'; require_once __DIR__.'/../../bootstrap/autoload.php';
require_once __DIR__.'/../../bootstrap/app.php'; require_once __DIR__.'/../../bootstrap/app.php';
$app->make(Kernel::class)->bootstrap();
register_shutdown_function( register_shutdown_function(
create_function( create_function(