drahak / Restful

Drahak\Restful - Nette REST API bundle
0 stars 0 forks source link

Problem in Input class when accessing data property #107

Closed marten-cz closed 8 years ago

marten-cz commented 8 years ago

When I send 'data' property in the body and I try them access as $this->input->data I'll get the same result as calling $this->input->getData()

Body example:

{ "data": "myText", "message": "second string" }

I can get message as $this->input->message, but I need to access data as $this->input->data['data']. This is because that Input class is extending Nette\Object and calling it's __get at line 78.

Is it necessary to extend Nette object? I think that object properties should be taken only from http request.

Can I remove this dependency or do you have any other solution for that?

drahak commented 8 years ago

It is not necessary to extend Nette Object however it should still implement __get method to access Input::$data members.