PHP code example of a1comms / gae-support-l5

1. Go to this page and download the library: Download a1comms/gae-support-l5 library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

a1comms / gae-support-l5 example snippets


'providers' => [
    Shpasser\GaeSupportL5\GaeSupportServiceProvider::class
];

return array(

	...

	/*
	|--------------------------------------------------------------------------
	| GAE Queue Connection
	|--------------------------------------------------------------------------
	|
	*/

	'connections' => array(

		'gae' => array(
			'driver'	=> 'gae',
			'queue'		=> 'default',
			'url'		=> '/tasks',
			'encrypt'	=> true,
		),

		...

	),

);

Route::post('tasks', array('as' => 'tasks',
function()
{
	return Queue::marshal();
}));

'gae' => [
    'driver' => 'gae',
    'root'   => storage_path().'/app',
],

FILESYSTEM = gae

CACHE_COMPILED_VIEWS = true

CACHE_SERVICES_FILE = true
CACHE_CONFIG_FILE = true
CACHE_ROUTES_FILE = true

FILESYSTEM = gae



/*
|--------------------------------------------------------------------------
| Start our GAE time tracing.
|--------------------------------------------------------------------------
|
| Initiate our GAETrace class to allow us to time trace our code.
| Starting things here will make sure we can trace as much code as possible,
| while ensuring the destructor will always run.
|
*/
use \Shpasser\GaeSupportL5\Trace\GAETrace;
$gae_trace = new GAETrace();

use \Shpasser\GaeSupportL5\Trace\GAETrace;

//...

$span_id = GAETrace::startSpan("FriendlyName");

//...code here...

GAETrace::endSpan($span_id);



/*
|--------------------------------------------------------------------------
| Register The Composer Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader
| for our application. We just need to utilize it! We'll 

'providers' => [
    Shpasser\GaeSupportL5\GaeArtisanConsoleServiceProvider::class
];
yaml
    - url: /gae/trace_submit
      script: public/trace.php
      login: admin
      secure: always
yaml
handlers:

        - url: /gae/.*
          script: public/index.php
          login: admin
          secure: always

        - url: /.*
          script: public/index.php