1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
<?php
/*
* (c) Markus Lanthaler <mail@markus-lanthaler.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace ML\JsonLD;
/**
* RemoteDocument
*
* @author Markus Lanthaler <mail@markus-lanthaler.com>
*/
class RemoteDocument
{
/**
* @var string The URL of the loaded document.
*/
public $documentUrl;
/**
* @var string The document's media type
*/
public $mediaType;
/**
* @var mixed The retrieved document. This can either be the raw payload
* or the already parsed document.
*/
public $document;
/**
* @var string|null The value of the context Link header if available;
* otherwise null.
*/
public $contextUrl;
/**
* Constructor
*
* @param null|string $documentUrl The final URL of the loaded document.
* @param mixed $document The retrieved document (parsed or raw).
* @param null|string $mediaType The document's media type.
* @param null|string $contextUrl The value of the context Link header
* if available; otherwise null.
*/
public function __construct($documentUrl = null, $document = null, $mediaType = null, $contextUrl = null)
{
$this->documentUrl = $documentUrl;
$this->document = $document;
$this->mediaType = $mediaType;
$this->contextUrl = $contextUrl;
}
}
|