/** * Constructor for Territories */ public function __construct($uri = "") { $this->_objectID = Guid::NewGuid(); $this->_baseURI = $uri; $this->_entityMap['Region'] = 'Region'; $this->_entityMap['Employees'] = 'Employees'; $this->_entityKey[] = 'TerritoryID'; $this->Region = array(); $this->Employees = array(); }
public function Tables($uri = "") { $this->_objectID = Guid::NewGuid(); $this->_baseURI = $uri; }
/** * Constructor for sysdiagrams */ public function __construct($uri = "") { $this->_objectID = Guid::NewGuid(); $this->_baseURI = $uri; $this->_entityKey[] = 'diagram_id'; }
/** * * @param <Uri> $uri */ public function __construct($uri = "") { $this->_baseURI = $uri; $this->Timestamp = '1900-01-01T00:00:00'; $this->_objectID = Guid::NewGuid(); }
public function BatchRequest($replaceOnUpdateOption) { $this->_changesetBoundry = "changeset_" . Guid::NewGuid(); $changedEntriesCount = count($this->_changedEntries); if ($changedEntriesCount > 0) { try { Utility::WriteLine($this->_batchRequestBody, "--" . $this->_batchBoundary); Utility::WriteLine($this->_batchRequestBody, "Content-Type: multipart/mixed; boundary=" . $this->_changesetBoundry); Utility::WriteLine($this->_batchRequestBody, null); for ($i = 0; $i < $changedEntriesCount; $i++) { Utility::WriteLine($this->_batchRequestBody, "--" . $this->_changesetBoundry); $changesetHeader = $this->CreateChangeSetHeader($i, $replaceOnUpdateOption); $changesetBody = $this->CreateChangeSetBody($i); if ($changesetBody != null) { Utility::WriteLine($changesetHeader, "Content-Length: " . strlen($changesetBody)); } Utility::WriteLine($changesetHeader, null); $this->_batchRequestBody = $this->_batchRequestBody . $changesetHeader; if ($changesetBody != null) { $this->_batchRequestBody = $this->_batchRequestBody . $changesetBody; } } } catch (InvalidOperation $exception) { //InvalidOperation Exception can be thrown only from the processing //logic of framework while building the batch request headers and //body, so no http repsonse headers, status code will be there. throw new ODataServiceException($exception->getError(), '', array(), null); } Utility::WriteLine($this->_batchRequestBody, "--" . $this->_changesetBoundry . "--"); Utility::WriteLine($this->_batchRequestBody, "--" . $this->_batchBoundary . "--"); $this->PerformBatchRequest(); $this->EndBatchRequest(); } }
/** * Constructor for Person */ public function __construct($uri = "") { $this->_objectID = Guid::NewGuid(); $this->_baseURI = $uri; $this->_entityMap['Awards'] = 'TitleAwards'; $this->_entityMap['TitlesActedIn'] = 'Titles'; $this->_entityMap['TitlesDirected'] = 'Titles'; $this->_entityKey[] = 'Id'; $this->Awards = array(); $this->TitlesActedIn = array(); $this->TitlesDirected = array(); }