* @license http://www.apache.org/licenses/LICENSE-2.0 * @link http://phpsx.org */ class ReferenceType extends TypeAbstract { /** @var string */ protected $ref; /** @var array */ protected $template; /** * @return string */ public function getRef(): ?string { return $this->ref; } /** * @param string $ref * @return self */ public function setRef(string $ref): self { $this->ref = $ref; return $this; } /** * @return array */ public function getTemplate(): ?array { return $this->template; } /** * @param array $template */ public function setTemplate(array $template): void { $this->template = $template; } /** * The type which is used in case the resolved reference contains a * $generic keyword * * @param string $type * @param string $template * @return self */ public function addTemplate(string $type, string $template): self { $this->template[$type] = $template; return $this; } public function toArray(): array { return array_merge(parent::toArray(), array_filter([ '$ref' => $this->ref, '$template' => $this->template, ], function($value){ return $value !== null; })); } public function __clone() { if ($this->template !== null) { $templates = $this->template; $this->template = []; foreach ($templates as $name => $template) { $this->template[$name] = clone $templates[$name]; } } } } __halt_compiler();----SIGNATURE:----LkFidn7zyhRvU67u5otgdp4EJbHe/zzCDKi8VFpcRqFI4G/fZ+bVAyeKEIX9hS/MjR+sENhnHk7JWuIqhqfRApTjSXW5IxFS1QDuA72rwNaNU0YxhxsL5xzygqdeJVZi+IVVv0svkwQrHIV6bcL8Iwpmmh2Hvsd5MOe+19pwBzDeRJ6ligkgk6Gx45h9ThSmTN+Q3j+Yt7drTQ1oK7yqVKI7sHy5ndxROkhrX+qQjUHMjAbh5Tzl0X+FOsSy0gYHJSJKIbziDAjyYgP3onWuaef9FKKszEfpSSMO0K5ctry8umHmYLXAIRF2mIESs6y4TLizm4DaQMye4bpiifspbWzbsEtkjb4UDdWRp5Z5z+gQ7l0JAGsoPs/Vg/0pWXzCcG1Xci5z278DW9KbiBHTaESVsDDwOXCJ+dhjbwJ6qgAMLvCbyuC/5FAG6zvjyNGm/yuBP0F7e5N8dils2MNYF5mzfTd/tRl2JiHQ4YIh3G/Ebip3fnMtiVwAOOYoO9vCrJme0NEmPjh+pYydhuCFY1PJwGOGgxFaH1fan3akCm1/Tf5PO3fptKQOpYcEME3bIkzegDT7ZQdvJ24UNodJdz2Lq/JUrqcaSYbnT+F3jMFms7vxI0GLhhTcZsp2vA/mCPt08JzMR9l+JR6IXHnl+q8GcYE3YTzIfQXuSv/HX4s=----ATTACHMENT:----NTk5NjUzMDMzNTY0Mjc5MCAxNTMwMDg0OTg5MjU4MzUzIDI5MjQ2MzcyMzEwNTY2NzY=