Exemple #1
0
 /**
  * Parses the incoming request path and sets appropriate properties on this RestRequest object.
  *
  * @param   string  $path
  * @return  self
  * @throws  RestException
  */
 private function parsePath($path)
 {
     $parts = explode('/', trim($path, '/'));
     for ($i = 0; $i < 1; $i++) {
         // All paths must contain /{workspace_entityType}
         if (false === $this->issetNotEmpty($i, $parts)) {
             throw RestException::invalidEndpoint($path);
         }
     }
     $this->extractEntityType($parts);
     $this->extractIdentifier($parts);
     $this->extractRelationship($parts);
     return $this;
 }