pocesar/phery — pull request #11 by m-hume (2013-07-20 16:36:35+00:00)
Title: PheryResponse call() this context

When using the PheryResponse object to call a javascript function nested in an object variable, the "this" context of the function is the "window" object.
If you rely on other methods/properties of this object they are not relatively accessible.
For example

php
```
PheryResponse::factory()->call(array('my_object','my_function'), $my_parameters)
```

javascript
```
var my_object = {
my_property: 'hello world',
my_function: function(){
console.log('this=', this);
console.log('my_property=', this.my_property);
}
}
```

When you run this you get this=window and my_property=undefined

Now the small edit i've made makes it work as you would hope i.e. this=my_object
As i'm not 100 percent with the code base i may well have broken something else... I think only Paulo can determine that.
cheers
mh