Skip to content

Commit

Permalink
Updated README.md with fully qualified namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
olivertappin committed Dec 10, 2019
1 parent 04b012a commit 36ad595
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ QUEUE_DRIVER=sqs-plain
If you plan to push plain messages from Laravel or Lumen, you can rely on DispatcherJob:

```php
namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use Dusterio\PlainSqs\Jobs\DispatcherJob;

class ExampleController extends Controller
Expand Down Expand Up @@ -140,7 +143,10 @@ If a third-party application is creating custom-format JSON messages, just add a
implement a handler class as follows:

```php
namespace App\Jobs;

use Illuminate\Contracts\Queue\Job as LaravelJob;
use Illuminate\Queue\Jobs\Job;

class HandlerJob extends Job
{
Expand All @@ -158,10 +164,15 @@ class HandlerJob extends Job
// Raw JSON payload from SQS, if necessary
var_dump($job->getRawBody());
}
}

public function getRawBody() {}

public function getJobId() {}
}
```

Please note, we are declaring the `getRawBody` and `getJobId` methods to satisfy the abstract class requirements. However, these are not used when processing messages.

## Todo

1. Add more unit and integration tests
Expand Down

0 comments on commit 36ad595

Please sign in to comment.