Remove spaces from README code samples.

This commit is contained in:
Rajib Ahmed 2013-07-18 11:51:02 +02:00
parent 2d4458fbed
commit 14989b0e9e

View File

@ -52,13 +52,12 @@ If you're not familiar with Composer, please see <http://getcomposer.org/>.
1. Add php-resque to your application's composer.json. 1. Add php-resque to your application's composer.json.
```json ```json
{ {
... //...
"require": { "require": {
"chrisboulton/php-resque": "1.2.x" "chrisboulton/php-resque": "1.2.x"
}, },
... // ...
} }
``` ```
@ -78,7 +77,6 @@ If you're not familiar with Composer, please see <http://getcomposer.org/>.
Jobs are queued as follows: Jobs are queued as follows:
```php ```php
// Required if redis is located elsewhere // Required if redis is located elsewhere
Resque::setBackend('localhost:6379'); Resque::setBackend('localhost:6379');
@ -86,7 +84,6 @@ Jobs are queued as follows:
'name' => 'Chris' 'name' => 'Chris'
); );
Resque::enqueue('default', 'My_Job', $args); Resque::enqueue('default', 'My_Job', $args);
``` ```
### Defining Jobs ### ### Defining Jobs ###
@ -94,7 +91,6 @@ Jobs are queued as follows:
Each job should be in it's own class, and include a `perform` method. Each job should be in it's own class, and include a `perform` method.
```php ```php
class My_Job class My_Job
{ {
public function perform() public function perform()
@ -103,7 +99,6 @@ Each job should be in it's own class, and include a `perform` method.
echo $this->args['name']; echo $this->args['name'];
} }
} }
``` ```
When the job is run, the class will be instantiated and any arguments When the job is run, the class will be instantiated and any arguments
@ -120,7 +115,6 @@ The `tearDown` method if defined, will be called after the job finishes.
```php ```php
class My_Job class My_Job
{ {
public function setUp() public function setUp()
@ -191,9 +185,9 @@ not having a single environment such as with Ruby, the PHP port makes
*no* assumptions about your setup. *no* assumptions about your setup.
To start a worker, it's very similar to the Ruby version: To start a worker, it's very similar to the Ruby version:
```sh
$ QUEUE=file_serve php bin/resque $ QUEUE=file_serve php bin/resque
```
It's your responsibility to tell the worker which file to include to get It's your responsibility to tell the worker which file to include to get
your application underway. You do so by setting the `APP_INCLUDE` environment your application underway. You do so by setting the `APP_INCLUDE` environment
variable: variable: