/** * @param string $entity The type of the entity, which was not found * @param string $argument The argument of the entity, which was not passed */ public function __construct($entity, $argument) { $this->entity = $entity; $this->argument = $argument; $message = 'The "' . $entity . '"-entity requires a "' . $argument . '"-argument'; parent::__construct($message, 0); }
/** * @param string $field */ public function __construct($field, $entity, $type, $code) { $this->field = $field; $this->entity = $entity; $this->type = $type; parent::__construct(sprintf('%s constraint for field "%s" of entity "%s" violated', ucfirst($type), $field, $entity), $code); }
/** * @param string $entity The type of the entity, which was not found * @param int $id The id of the entity, which was not found */ public function __construct($entity, $id) { $this->entity = $entity; $this->id = $id; $message = 'Entity with the type "' . $entity . '" and the id "' . $id . '" not found.'; parent::__construct($message, 0); }
/** * @param string $entity The type of the entity, which was not found * @param int $id The id of the entity, which was not found */ public function __construct($entity, $id) { $this->entity = $entity; $this->id = $id; $message = 'The id-field of the "' . $entity . '"-Entity already has an id with the value "' . $id . '" .'; parent::__construct($message, 0); }
/** * @param string $entity The type of the entity * @param string $argument The argument of the entity, which was invalid * @param null $customMessage */ public function __construct($entity, $argument, $customMessage = null) { $this->entity = $entity; $this->argument = $argument; $message = 'The "' . $entity . '"-entity requires a valid "' . $argument . '"-argument. '; if ($customMessage != null) { $message .= $customMessage; } parent::__construct($message, 0); }
/** * Constructor * * @param string $updated_since */ public function __construct($updated_since) { parent::__construct('rest_updatedsince_bad_format', 400, array('updatedSince' => $updated_since)); }
/** * @param string $controller * @param string[] $names */ public function __construct($controller, $names) { parent::__construct(sprintf('Missing parameter "%s" in %s', implode('" or "', $names), $controller), 0); $this->controller = $controller; $this->names = $names; }
/** * Constructor * * @param int $id */ public function __construct($id) { parent::__construct('survey_not_found', 404, array('id' => $id)); }
/** * Constructor * * @param Survey $survey */ public function __construct($survey) { parent::__construct('vote_already_exists', 403, array('survey_id' => $survey->id)); }
/** * @param array $errors * @param int $code */ public function __construct(array $errors, $code = 422) { $this->errors = $errors; parent::__construct(json_encode($errors), $code, null); }
/** * Constructor * * @param string $message Error message * @param \Exception $prev Previous Exception */ public function __construct($message = "Serialization Error", $prev = null) { parent::__construct(Response::HTTP_INTERNAL_SERVER_ERROR, $message, $prev); }
/** * Constructor * * @param string $message Error message * @param \Exception $prev Previous Exception */ public function __construct($message = "Record must not be modified", $prev = null) { parent::__construct(Response::HTTP_BAD_REQUEST, $message, $prev); }
public function __construct($controller, $name) { parent::__construct(sprintf('Missing parameter %s in %s', $name, $controller), 0); $this->controller = $controller; $this->name = $name; }
/** * Constructor * * @param string $name name of the bad parameter */ public function __construct($name) { parent::__construct('rest_bad_parameter', 400, $name); }
public function __construct($entity, $id) { parent::__construct(sprintf('The given hash for the entity of type "%s" with the id "%s" does not match the current hash.' . ' The entity has probably been edited in the mean time.', $entity, $id), 1102); }
/** * Constructor * * @param string $message Error message * @param \Exception $prev Previous Exception */ public function __construct($message = "x-dynamic-key ref-field could not be resolved", $prev = null) { parent::__construct(Response::HTTP_INTERNAL_SERVER_ERROR, $message, $prev); }
/** * Creates a new custom error * * @param [:var] details * @param lang.Throwable cause */ public function __construct($details, $cause = NULL) { parent::__construct($details['server.message'], $cause); $this->details = $details; }
/** * Constructor * * @param string $message Error message * @param \Exception $prev Previous Exception */ public function __construct($message = "No Content", $prev = null) { parent::__construct(Response::HTTP_BAD_REQUEST, $message, $prev); }
/** * Constructor * * @param FormErrorIterator $errors Errors from form * @param string $message Error message */ public function __construct(FormErrorIterator $errors, $message = 'Validation failed') { $this->errors = $errors; parent::__construct(Response::HTTP_BAD_REQUEST, $message); }
/** * @param string $message * @param int $code */ public function __construct($message, $code = 401) { parent::__construct($message, $code, null); }
public function __construct($controller, $name) { parent::__construct(sprintf('Parameter %s has wrong data type in %s', $name, $controller), 0); $this->controller = $controller; $this->name = $name; }
public function __construct($verb, $url, ValidationResults $validationResults) { parent::__construct($validationResults->__toString(), $verb, $url); $this->validationResults = $validationResults; }
/** * Constructor * * @param string $message Error message * @param \Exception $prev Previous Exception */ public function __construct($message = "Invalid JSON Patch", $prev = null) { parent::__construct(Response::HTTP_BAD_REQUEST, $message, $prev); }