public function __construct(RestedServiceInterface $restedService, UrlGeneratorInterface $urlGenerator, ResourceInterface $resource, ContextInterface $context, $uri = null, array $data = []) { parent::__construct($uri, $data); $this->context = $context; $this->resource = $resource; $this->restedService = $restedService; $this->urlGenerator = $urlGenerator; if ($context->wantsMetadata() === false) { $uri = null; } $this->addLink('self', $uri); }
/** * Creates a new vnd.error document * * @param string $message For expressing a human readable message related * to the current error which may be displayed to the user of the api. * @param string $logref For expressing a (numeric/alpha/alphanumeric) * identifier to refer to the specific error on the server side for * logging purposes (i.e. a request number). */ public function __construct($message, $logref = null) { parent::__construct(); $this->message = $message; $this->logref = $logref; }