Пример #1
0
 /**
  * @param \WoohooLabs\Yin\JsonApi\Request\RequestInterface $request
  * @param array $validationErrors
  * @param boolean $includeOriginalBody
  */
 public function __construct(RequestInterface $request, array $validationErrors, $includeOriginalBody)
 {
     parent::__construct("Request body is an invalid JSON API document!" . print_r($validationErrors, true));
     $this->request = $request;
     $this->validationErrors = $validationErrors;
     $this->includeOriginalBody = $includeOriginalBody;
 }
 /**
  * @param string $relationshipName
  * @param string $currentRelationshipType
  * @param string $expectedRelationshipType
  */
 public function __construct($relationshipName, $currentRelationshipType, $expectedRelationshipType)
 {
     parent::__construct("The provided relationship '{$relationshipName}' is of type of {$currentRelationshipType}, but " . ($expectedRelationshipType ? "{$expectedRelationshipType} is" : "it is not the one which is") . " expected!");
     $this->relationshipName = $relationshipName;
     $this->currentRelationshipType = $currentRelationshipType;
     $this->expectedRelationshipType = $expectedRelationshipType;
 }
Пример #3
0
 /**
  * @param \Psr\Http\Message\ResponseInterface $response
  * @param string $lintMessage
  * @param boolean $includeOriginalBody
  */
 public function __construct(ResponseInterface $response, $lintMessage, $includeOriginalBody)
 {
     parent::__construct("Request body is an invalid JSON document: '{$lintMessage}'!");
     $this->response = $response;
     $this->lintMessage = $lintMessage;
     $this->includeOriginalBody = $includeOriginalBody;
 }
Пример #4
0
 /**
  * @param array $unrecognizedIncludes
  */
 public function __construct(array $unrecognizedIncludes)
 {
     parent::__construct("Included paths '" . implode(", ", $unrecognizedIncludes) . "' can't be recognized!");
     $this->unrecognizedIncludes = $unrecognizedIncludes;
 }
Пример #5
0
 public function __construct($relationship)
 {
     parent::__construct("The requested relationship '" . $relationship . "' does not exist!");
     $this->relationship = $relationship;
 }
Пример #6
0
 /**
  * @param string $relationshipName
  */
 public function __construct($relationshipName)
 {
     parent::__construct("Full replacement of relationship '{$relationshipName}' is prohibited!");
     $this->relationshipName = $relationshipName;
 }
Пример #7
0
 public function __construct()
 {
     parent::__construct("Application exception is thrown!");
 }
 /**
  * @param string|null $clientGeneratedId
  */
 public function __construct($clientGeneratedId)
 {
     parent::__construct("Client generated ID '{$clientGeneratedId}' already exists!");
     $this->clientGeneratedId = $clientGeneratedId;
 }
Пример #9
0
 /**
  * @param string $relationshipName
  */
 public function __construct($relationshipName)
 {
     parent::__construct("Removal of relationship '{$relationshipName}' is prohibited!");
     $this->relationshipName = $relationshipName;
 }
Пример #10
0
 /**
  * @param string $mediaTypeName
  */
 public function __construct($mediaTypeName)
 {
     parent::__construct("The media type '" . $mediaTypeName . "' is unacceptable in the 'Accept' header!");
     $this->mediaTypeName = $mediaTypeName;
 }
Пример #11
0
 public function __construct()
 {
     parent::__construct("Inclusion is not supported!");
 }
Пример #12
0
 public function __construct(array $resourceIdentifier)
 {
     parent::__construct("An ID for the resource identifier must be included!");
     $this->resourceIdentifier = $resourceIdentifier;
 }
Пример #13
0
 public function __construct()
 {
     parent::__construct("A client generated ID must be used!");
 }
Пример #14
0
 public function __construct()
 {
     parent::__construct("Sorting is not supported!");
 }
Пример #15
0
 /**
  * @param string $id
  */
 public function __construct($id)
 {
     parent::__construct("The resource ID '{$id}' is invalid!");
     $this->id = $id;
 }
Пример #16
0
 /**
  * @param string $sortParam
  */
 public function __construct($sortParam)
 {
     parent::__construct("Sorting parameter '{$sortParam}' , can't be recognized!");
     $this->sortParam = $sortParam;
 }
Пример #17
0
 /**
  * @param string $currentType
  * @param array $acceptedTypes
  */
 public function __construct($currentType, array $acceptedTypes)
 {
     parent::__construct("Resource type '{$currentType}' can't be accepted by the Hydrator!");
     $this->currentType = $currentType;
     $this->acceptedTypes = $acceptedTypes;
 }
Пример #18
0
 public function __construct()
 {
     parent::__construct("A resource type must be included in the document!");
 }
Пример #19
0
 /**
  * @param string|null $clientGeneratedId
  */
 public function __construct($clientGeneratedId)
 {
     parent::__construct("Client generated ID " . ($clientGeneratedId ? "'{$clientGeneratedId}' " : "") . "is not supported!");
     $this->clientGeneratedId = $clientGeneratedId;
 }
Пример #20
0
 public function __construct()
 {
     parent::__construct("The requested resource is not found!");
 }
Пример #21
0
 /**
  * @param string $unrecognizedQueryParam
  */
 public function __construct($unrecognizedQueryParam)
 {
     parent::__construct("Query parameter '{$unrecognizedQueryParam}' can't be recognized!");
     $this->unrecognizedQueryParam = $unrecognizedQueryParam;
 }
Пример #22
0
 /**
  * @param string $mediaTypeName
  */
 public function __construct($mediaTypeName)
 {
     parent::__construct("The media type '{$mediaTypeName}' is unsupported in the 'Content-Type' header!");
     $this->mediaTypeName = $mediaTypeName;
 }
Пример #23
0
 public function __construct()
 {
     parent::__construct("Missing `data` member at the document's top level!");
 }