Skip to content

Commit

Permalink
Merge pull request #488 from JellyBellyDev/master
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
makasim committed Sep 3, 2014
2 parents 043e6c2 + 3458aa6 commit 627f52b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ class MyController extends Controller
$imagemanagerResponse = $this->container
->get('liip_imagine.controller')
->filterAction(
$this->request // http request
'uploads/foo.jpg', // original image you want to apply a filter to
'my_thumb' // filter defined in config.yml
);
Expand All @@ -165,6 +166,14 @@ class MyController extends Controller

In case you need to add more logic the recommended solution is to either extend `ImagineController.php` controller or take the code from that controller as a basis for your own controller.

If you want to use the service in another service, you have to simulate a new request:

``` php
$imagemanagerResponse = $this->container
->get('liip_imagine.controller')
->filterAction($this->container->get('request'), 'uploads/foo.jpg', 'my_thumb');
```

## Outside the web root

When your setup requires your source images to live outside the web root, or if that's just the way you roll,
Expand Down

0 comments on commit 627f52b

Please sign in to comment.