public function __construct($value, $label = false) { if (!$label) { $label = $this->label; } parent::__construct($value, $this->uri, $this->name, $label); }
public function __construct($value, $label = '') { $this->uri = 'http://purl.org/dc/elements/1.1/title'; $this->name = 'title'; //becomes dc.contributor if ($label !== '') { $label = trim($this->label); } else { $this->label = 'Title'; } parent::__construct($value, $this->uri, $this->name, $label); }
/** * @param string $value * @param string $label * @param array $attrs */ public function __construct($value, $label = 'Format', array $attrs = []) { # value # , uri (part put in the uri) # , name (element name in the spec) # , label parent::__construct($value, $this->uriPart, $this->namePart, $label); $d = []; $d[] = $this->getDescription(); $d[] = 'The file format, physical medium, or dimensions of the resource.'; $d[] = 'Examples of dimensions include size and duration. Recommended best practice is to use a controlled vocabulary such as the list of Internet Media Types [MIME].'; $this->setDescription(implode('; ', $d)); $this->setAttributes($attrs); }
/** * @param string $value * @param string $label * @param array $attrs */ public function __construct($value, $label = 'Date', array $attrs = []) { # value # , uri (part put in the uri) # , name (element name in the spec) # , label parent::__construct($value, $this->uriPart, $this->namePart, $label); $d = []; $d[] = $this->getDescription(); $d[] = 'A point or period of time associated with an event in the lifecycle of the resource.'; $d[] = 'Date may be used to express temporal information at any level of granularity. Recommended best practice is to use an encoding scheme, such as the W3CDTF profile of ISO 8601 [W3CDTF].'; $this->setDescription(implode('; ', $d)); $this->setAttributes($attrs); }
/** * @param string $value * @param string $label * @param array $attrs */ public function __construct($value, $label = 'Creator', array $attrs = []) { # value # , uri (part put in the uri) # , name (element name in the spec) # , label parent::__construct($value, $this->uriPart, $this->namePart, $label); $d = []; $d[] = $this->getDescription(); $d[] = 'An entity primarily responsible for making the resource.'; $d[] = 'Examples of a Creator include a person, an organization, or a service. Typically, the name of a Creator should be used to indicate the entity.'; $this->setDescription(implode('; ', $d)); $this->setAttributes($attrs); }
public function __construct($value, $label = 'Contributor') { parent::__construct($value, 'http://purl.org/dc/elements/1.1/contributor', 'contributor', $label); }