hasRequestHeaders() public method

Check if resource has default request headers set.
public hasRequestHeaders ( ) : boolean
return boolean
Esempio n. 1
0
 /**
  * Append a request subsection to an action.
  *
  * @param string                              $contents
  * @param \Dingo\Blueprint\Annotation\Request $request
  * @param \Dingo\Blueprint\Resource           $resource
  *
  * @return void
  */
 protected function appendRequest(&$contents, $request, Resource $resource)
 {
     $this->appendSection($contents, 'Request');
     if (isset($request->identifier)) {
         $contents .= ' ' . $request->identifier;
     }
     $contents .= ' (' . $request->contentType . ')';
     if (!empty($request->headers) || $resource->hasRequestHeaders()) {
         $this->appendHeaders($contents, array_merge($resource->getRequestHeaders(), $request->headers));
     }
     if (isset($request->attributes)) {
         $this->appendAttributes($contents, collect($request->attributes), 1);
     }
     if (isset($request->body)) {
         $this->appendBody($contents, $this->prepareBody($request->body, $request->contentType));
     }
 }