Open Semantic Framework PHP API  3.0
 All Data Structures Namespaces Files Functions Variables Pages
CrudDeleteQuery.php
Go to the documentation of this file.
1 <?php
2 
5 
11 
54  class CrudDeleteQuery extends \StructuredDynamics\osf\php\api\framework\WebServiceQuery
55  {
64  function __construct($network, $appID, $apiKey, $userID)
65  {
66  // Set the OSF network & credentials to use for this query.
67  $this->setNetwork($network);
68  $this->appID = $appID;
69  $this->apiKey = $apiKey;
70  $this->userID = $userID;
71 
72  // Set default configarations for this web service query
73  $this->setSupportedMimes(array("text/xml",
74  "application/json",
75  "application/rdf+xml",
76  "application/rdf+n3",
77  "application/iron+json",
78  "application/iron+csv"));
79 
80  $this->setMethodGet();
81 
82  $this->mime("resultset");
83 
84  $this->setEndpoint("crud/delete/");
85 
86  // Set default parameters for this query
87  $this->sourceInterface("default");
88 
89  $this->soft();
90  }
91 
101  public function uri($uri)
102  {
103  $this->params["uri"] = urlencode($uri);
104 
105  return($this);
106  }
107 
119  public function dataset($uri)
120  {
121  $this->params["dataset"] = urlencode($uri);
122 
123  return($this);
124  }
125 
136  public function soft()
137  {
138  $this->params["mode"] = 'soft';
139 
140  return($this);
141  }
142 
152  public function hard()
153  {
154  $this->params["mode"] = 'hard';
155 
156  return($this);
157  }
158  }
159 
161 ?>
uri($uri)
Specifies the URI of the record to be deleted from the system.
__construct($network, $appID, $apiKey, $userID)
Constructor.
dataset($uri)
Set the URI(s) of the dataset where the instance record is indexed.
hard()
Specify that this query will delete the published record and all its revisions.
Crud Delete Query to a OSF Crud Delete web service endpoint.
soft()
Specify that this query will only delete the published record and not any of its possible revision...