Closed dave-irvine closed 7 years ago
Actually, this is the correct behaviour: this object is an instance of the PHPObject
class (https://github.com/uniter/phpcore/blob/master/src/PHPObject.js) which deals with exposing PHP objects to JS-land.
Thinking about it some more, in this specific case (where the returned value is an instance of JSObject
, because it originated from JS-land) I think it might make sense to unwrap and return the native JS object again. In other cases though, a PHPObject
that wraps the object would need to be returned to handle coercing method arguments from JS to PHP.
Going through and clearing up some old issues...
This seems to be working as you expected in the latest PHPCore, probably since the fix in https://github.com/uniter/phpcore/commit/c845d0a599f37b68058b60fa34751ffa7586dac1.
Thanks!