path[$key] = $path; return $this; } /** * @param string $key * * @return bool */ public function has(string $key): bool { return (array_key_exists($key, $this->path)); } /** * @return array */ public function getPath(): array { return $this->path; } /** * Return an array with includes as options * * @return array */ public function getAsOptions(): array { return array_merge( [ 'path' => $this->getPath() ], parent::getAsOptions() ); } /** * Return a JSON object with includes as options * * @return array */ public function JsonSerialize(): array { return $this->getAsOptions(); } }