Ejemplo n.º 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;
 }
Ejemplo n.º 2
0
 /**
  * @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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 4
0
 /**
  * @param array $unrecognizedIncludes
  */
 public function __construct(array $unrecognizedIncludes)
 {
     parent::__construct("Included paths '" . implode(", ", $unrecognizedIncludes) . "' can't be recognized!");
     $this->unrecognizedIncludes = $unrecognizedIncludes;
 }
Ejemplo n.º 5
0
 public function __construct($relationship)
 {
     parent::__construct("The requested relationship '" . $relationship . "' does not exist!");
     $this->relationship = $relationship;
 }
Ejemplo n.º 6
0
 /**
  * @param string $relationshipName
  */
 public function __construct($relationshipName)
 {
     parent::__construct("Full replacement of relationship '{$relationshipName}' is prohibited!");
     $this->relationshipName = $relationshipName;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 9
0
 /**
  * @param string $relationshipName
  */
 public function __construct($relationshipName)
 {
     parent::__construct("Removal of relationship '{$relationshipName}' is prohibited!");
     $this->relationshipName = $relationshipName;
 }
Ejemplo n.º 10
0
 /**
  * @param string $mediaTypeName
  */
 public function __construct($mediaTypeName)
 {
     parent::__construct("The media type '" . $mediaTypeName . "' is unacceptable in the 'Accept' header!");
     $this->mediaTypeName = $mediaTypeName;
 }
Ejemplo n.º 11
0
 public function __construct()
 {
     parent::__construct("Inclusion is not supported!");
 }
Ejemplo n.º 12
0
 public function __construct(array $resourceIdentifier)
 {
     parent::__construct("An ID for the resource identifier must be included!");
     $this->resourceIdentifier = $resourceIdentifier;
 }
Ejemplo n.º 13
0
 public function __construct()
 {
     parent::__construct("A client generated ID must be used!");
 }
Ejemplo n.º 14
0
 public function __construct()
 {
     parent::__construct("Sorting is not supported!");
 }
Ejemplo n.º 15
0
 /**
  * @param string $id
  */
 public function __construct($id)
 {
     parent::__construct("The resource ID '{$id}' is invalid!");
     $this->id = $id;
 }
Ejemplo n.º 16
0
 /**
  * @param string $sortParam
  */
 public function __construct($sortParam)
 {
     parent::__construct("Sorting parameter '{$sortParam}' , can't be recognized!");
     $this->sortParam = $sortParam;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 18
0
 public function __construct()
 {
     parent::__construct("A resource type must be included in the document!");
 }
Ejemplo n.º 19
0
 /**
  * @param string|null $clientGeneratedId
  */
 public function __construct($clientGeneratedId)
 {
     parent::__construct("Client generated ID " . ($clientGeneratedId ? "'{$clientGeneratedId}' " : "") . "is not supported!");
     $this->clientGeneratedId = $clientGeneratedId;
 }
Ejemplo n.º 20
0
 public function __construct()
 {
     parent::__construct("The requested resource is not found!");
 }
Ejemplo n.º 21
0
 /**
  * @param string $unrecognizedQueryParam
  */
 public function __construct($unrecognizedQueryParam)
 {
     parent::__construct("Query parameter '{$unrecognizedQueryParam}' can't be recognized!");
     $this->unrecognizedQueryParam = $unrecognizedQueryParam;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 23
0
 public function __construct()
 {
     parent::__construct("Missing `data` member at the document's top level!");
 }