server/src/artisan
changeset 1 01a844d292ac
equal deleted inserted replaced
0:279124b91971 1:01a844d292ac
       
     1 #!/usr/bin/env php
       
     2 <?php
       
     3 
       
     4 /*
       
     5 |--------------------------------------------------------------------------
       
     6 | Register The Auto Loader
       
     7 |--------------------------------------------------------------------------
       
     8 |
       
     9 | Composer provides a convenient, automatically generated class loader
       
    10 | for our application. We just need to utilize it! We'll require it
       
    11 | into the script here so that we do not have to worry about the
       
    12 | loading of any our classes "manually". Feels great to relax.
       
    13 |
       
    14 */
       
    15 
       
    16 require __DIR__.'/bootstrap/autoload.php';
       
    17 
       
    18 $app = require_once __DIR__.'/bootstrap/app.php';
       
    19 
       
    20 /*
       
    21 |--------------------------------------------------------------------------
       
    22 | Run The Artisan Application
       
    23 |--------------------------------------------------------------------------
       
    24 |
       
    25 | When we run the console application, the current CLI command will be
       
    26 | executed in this console and the response sent back to a terminal
       
    27 | or another output device for the developers. Here goes nothing!
       
    28 |
       
    29 */
       
    30 
       
    31 $kernel = $app->make('Illuminate\Contracts\Console\Kernel');
       
    32 
       
    33 $status = $kernel->handle(
       
    34 	$input = new Symfony\Component\Console\Input\ArgvInput,
       
    35 	new Symfony\Component\Console\Output\ConsoleOutput
       
    36 );
       
    37 
       
    38 /*
       
    39 |--------------------------------------------------------------------------
       
    40 | Shutdown The Application
       
    41 |--------------------------------------------------------------------------
       
    42 |
       
    43 | Once Artisan has finished running. We will fire off the shutdown events
       
    44 | so that any final work may be done by the application before we shut
       
    45 | down the process. This is the last thing to happen to the request.
       
    46 |
       
    47 */
       
    48 
       
    49 $kernel->terminate($input, $status);
       
    50 
       
    51 exit($status);