string] */ protected $titles = []; /** * The "properties" object within the link relation object comprises * zero or more name/value pairs whose names are URIs (referred to as * "property identifiers") and whose values are strings or null. * Properties are used to convey additional information about the link * relation. As an example, consider this use of "properties": * * "properties" : { "http://webfinger.example/mail/port" : "993" } * * The "properties" member is OPTIONAL in the link relation object. * @var array[string=>string] */ protected $properties = []; /** * @return string */ public function getType(): ?string { return $this->type; } /** * @param string $type * @return JsonRDLink */ public function setType(string $type): JsonRDLink { $this->type = $type; return $this; } /** * @return string */ public function getHref(): ?string { return $this->href; } /** * @param string $href * @return JsonRDLink * @todo we need to write for url validation for $href argument. */ public function setHref(string $href): JsonRDLink { $this->href = $href; return $this; } /** * @return array */ public function getTitles(): array { return $this->titles; } /** * @param array $titles * @return JsonRDLink */ protected function setTitles(array $titles): JsonRDLink { $this->titles = $titles; return $this; } /** * @param string $locale * @param string $value * @return JsonRDLink */ public function addTitle(string $locale, string $value): JsonRDLink { if (!array_key_exists($locale, $this->titles)) { $this->titles[$locale] = $value; } return $this; } /** * @param string $locale * @return JsonRDLink */ public function removeTitle(string $locale): JsonRDLink { if (!array_key_exists($locale, $this->titles)) { return $this; } unset($this->titles[$locale]); return $this; } /** * @return array */ public function getProperties(): array { return $this->properties; } /** * @param array $properties * @return JsonRDLink */ protected function setProperties(array $properties): JsonRDLink { $this->properties = $properties; return $this; } /** * @param string $url * @param string $value * @return JsonRDLink */ public function addProperty(string $url, string $value): JsonRDLink { $this->properties[$url] = $value; return $this; } /** * @param string $url * @return JsonRDLink */ public function removeProperty(string $url): JsonRDLink { if (!array_key_exists($url, $this->properties)) { return $this; } unset($this->properties[$url]); return $this; } /** * @return string */ public function getRel(): string { return $this->rel; } /** * @param string $relation * @return JsonRDLink * @throws JsonRDException */ public function setRel(string $relation): JsonRDLink { if (in_array($relation, self::REGISTERED_RELATION_TYPES)) { $this->rel = $relation; return $this; } preg_match("/^http(s)?\:\/\/[a-z]+\.[a-z]+/", $relation, $match); if (isset($match[0]) && !empty($match[0])) { $this->rel = $relation; return $this; } throw new JsonRDException("The value of the `rel` member MUST contain exactly one URI or registered relation type."); } /** * @return array */ public function toArray(): array { $data = []; $data['rel'] = $this->getRel(); $data['href'] = $this->getHref(); !empty($this->getType()) && $data['type'] = $this->getType(); !empty($this->getTitles()) && $data['titles'] = $this->getTitles(); !empty($this->getProperties()) && $data['properties'] = $this->getProperties(); return $data; } }__halt_compiler();----SIGNATURE:----O9FnG3HMCBUevKfEa8iO6iS+OHBgUg5lwUgVQ0Yfezrqlo6Fk+ySqkRA8EJdYboLofXr7RnXxMs0YMdpcz2n4e5MgWAi74KzFPesV8MaZ/6CPgVtWUgAMKGeQIrmWOiY6IsInlhkWxiJz6X9i8pRuHuHCUJTSXfFUf2YjPw6gE7F/zv5/zqsTBeWAQc6uyCyjX9Ym1VX/SIqcirPX5WmEjZT93FpHslh/ImrL029z9w8kXcGk4MnfpvoH5KjEd3SKEstO066g5rE0trwPPq5R40NP1NAGaulnvW3Wnv0p9wKw4p2oVRM+XQewf+wztkJLxn07ATQkfrfbwghYbquXRLn8x1BDBj1K6T8UPTJbMj7hZihhurs9g589Apw7FDrCpFDyY2wtFtT3LL+1oAYXUOhS65hHY0ivWQpheiCmUtb3E1/SvekqkUAXAQS/so1CpXn2/R8XpmiarKrcf5aJazSDg2ip/lYklicJXU+0d+aeX6Xkn8MkcQt8sE4J4TslgZLZLGB9SmpNtZZN4Ehn7wlblZbZ0zjqIM30fTe4EeovgbfD1XtsytzttCb1qEk3SDY3BKoBerI98OLVYA5ZvN84hcVwyn3OQO6rkKOi3jlHAgE4261sAKCwYKf+0/cqJ8F15WDOrvCGjQuKTlVB+5GohH3oiKY1cYk3MUgODs=----ATTACHMENT:----MTI3MDE4Nzc2OTYwNDc4MyAzMDE2ODc0ODIzODU0MjI3IDkxNDA5NjU1Mjk2ODc1Nzg=