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:----AdQ6l2SxLAaFfoUcxpaPb+ANOfmKRrR3QvK+vwkl9YHm6pe8sC/itcVlQNYsVZ2IRVUeYNreiZFwnJlqEZ9iIshQO0gPIzZGIbK+XB97d0A2YpNX9RNTARa2KOrpo9+HBq2K0P32DwF1aLuEUedtpSKkwnyDSGmKchHZ1pPwgGas0OIaAEdoDWRKTZDJko2k9K+vYR+jqy0XyWh3YG4Tf3ID9Ipvi3XUfcYH0VXZX/r+pt35oLyBdoGatvGnv1048fstwThdALpOVMHJLk7etUegbPBPmjypC3s9v0+TTsGgD8OiRvJ0Pm+WuWxsO01tY7NDx+MeKGaIeNSXtASa09APz+sEZkdBtR7eUKH26Am1tBv8Kj2TDmCJQ3n0G6yn62zP71iA/Pphy3vVVk8mIwxzz7DvXTWTEG36KazrUX8pgXXueL8Q79u/iGEi1+wluxs9XLF9vf9pbA/w9lFgv96drI2bJ6rSlktyq6G7Xj1VahnuZ+GhfsHaVNeYZZIaxZq9WX2LeCdoY5vyfampsZRj/nV99YskGygw7yNEgn4VvcO1QP2mOO9rO6WMJcM+poceK9CRz/Zvm5T2HrZnmO2wvgONCQoLvea6v+Ihyqhgp+Y6TYOIIkRHSNRROtl2s37NeApGVTyxv0wkj2e+b5YH9TsBtu7wKAhdzC+gS3k=----ATTACHMENT:----OTc5MDMwNDM2ODI5MzE4NyA0NTQzNDU2MDAwNzcwMjI0IDEyOTUzNTYyNjQ2MDczMA==