1. Go to this page and download the library: Download zfr/zfr-eb-worker 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/ */
zfr / zfr-eb-worker example snippets
use Aws\Sdk as AwsSdk;
use Interop\Container\ContainerInterface;
use RuntimeException;
class AwsSdkFactory
{
/**
* @param ContainerInterface $container
* @return AwsSdk
*/
public function __invoke(ContainerInterface $container): AwsSdk
{
$config = $container->get('config');
if (!isset($config['aws'])) {
throw new RuntimeException('Key "aws" is missing');
}
return new AwsSdk($config['aws']);
}
}
use Aws\Sdk as AwsSdk;
return [
'dependencies' => [
'factories' => [
AwsSdk::class => AwsSdkFactory::class
]
]
];
return [
'aws' => [
'region' => 'us-east-1', // Replace by your region
'Sqs' => ['version' => '2012-11-05'], // Add all your other services
'credentials' => [
'key' => 'YOUR_USER_KEY',
'secret' => 'YOUR_SECRET_KEY'
]
]
];
use Symfony\Component\Console\Application;
chdir(dirname(__DIR__));
iner = iner->get('config')['console']['commands'];
foreach ($commands as $command) {
$application->add($container->get($command));
}
$application->run();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.