We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently the ResourceObject.id property is private and can therefore not be accessed once the object is instantiated. Is this on purpose?
Rationale I would like to be to access it, so the id can be used to (dynamically) generate a DELETE request like:
https://domain.ext/api/v1/resourceName/id/$id
Something like:
//application.php $articleResource = ArticleResource::getInstance(123); if( $apiClient->delete($articleResource)){ echo 'deleted Article!'; }
//apiClient.php public function delete(Resource $resource) : bool{ $request = $this->someRequestBuilder->getDeleteRequest($articleResource) $response = $this->sendRequest($request); return $this->analyzeRespons($response); }
Maybe the ResourceObject.id should not be accessed, that is possible, but in that case I would like to know "why" 😄
The text was updated successfully, but these errors were encountered:
Hi @holtkamp,
The only purpose of the id field being private without any getter/setter is that I didn't have any meaningful use-case in mind for accessing it.
Would it be OK for you if I added the id(), type(), attributes() and relationships() accessors as well as the setId() and setType() mutators?
id()
type()
attributes()
relationships()
setId()
setType()
Sorry, something went wrong.
Done in fb53960 :)
No branches or pull requests
Currently the ResourceObject.id property is private and can therefore not be accessed once the object is instantiated. Is this on purpose?
Rationale
I would like to be to access it, so the id can be used to (dynamically) generate a DELETE request like:
Something like:
Maybe the ResourceObject.id should not be accessed, that is possible, but in that case I would like to know "why" 😄
The text was updated successfully, but these errors were encountered: