Answer the question
In order to leave comments, you need to log in
How to work with class?
Hello!
I have a question, there is a class:
DeleteTarget.php
pastebin.com/jkvV9LbY
How do I correctly pass the target id there so that everything works ??
I do it like this:
delete.php
pastebin.com/JD3n6vCy
only change a little in the class itself:
class DeleteTarget{
//Server Keys
private $access_key; // ставил public но ошибка не меняется
private $secret_key;
private $targetId;
private $url = "https://vws.vuforia.com";
private $requestPath = "/targets/";
private $request;
{
result_code: "Success",
transaction_id: "7f0882c3d76b47bb9a87c0ddf339a83f"
}
Answer the question
In order to leave comments, you need to log in
Your class uses an obsolete constructor form (instead of __constructor()), which also takes no arguments.
To delete in the constructor is a sin. Therefore, for deletion, it is better to make a separate method, which is then called (either after initialization, or a static method).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question