mirror of
https://github.com/filp/whoops.git
synced 2026-09-04 22:48:11 +00:00
Add PhpStormOpener to editors README section
This commit is contained in:
@@ -183,6 +183,24 @@ $handler->setEditor(function($file, $line) {
|
||||
|
||||
```
|
||||
|
||||
You can add PhpStorm support with [PhpStormOpener](https://github.com/pinepain/PhpStormOpener#phpstormopener) (Mac OS X only):
|
||||
```php
|
||||
|
||||
$handler->setEditor(
|
||||
function ($file, $line) {
|
||||
// if your development server is not local it's good to map remote files to local
|
||||
$translations = array('^' . __DIR__ => '~/Development/PhpStormOpener'); // change to your path
|
||||
|
||||
foreach ($translations as $from => $to) {
|
||||
$file = preg_replace('#' . $from . '#', $to, $file, 1);
|
||||
}
|
||||
|
||||
return "pstorm://$file:$line";
|
||||
}
|
||||
);
|
||||
|
||||
```
|
||||
|
||||
### Available Handlers
|
||||
|
||||
**whoops** currently ships with the following built-in handlers, available in the `Whoops\Handler` namespace:
|
||||
|
||||
Reference in New Issue
Block a user