コード例 #1
0
 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);
 }
コード例 #2
0
ファイル: VndError.php プロジェクト: ramsey/vnderror
 /**
  * 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;
 }