/** * @return array * @throws \InvalidArgumentException * @throws \LTDBeget\sphinx\configurator\exceptions\SectionException * @throws \LogicException * @throws \LTDBeget\sphinx\configurator\exceptions\ConfigurationException */ public function toArray() : array { return ArraySerializer::serialize($this); }
/** * Make json encoded content for sphinx configuration file from Configuration object * * @param Configuration $configuration * * @return string * @throws \InvalidArgumentException * @throws \LTDBeget\sphinx\configurator\exceptions\SectionException * @throws \LogicException * @throws \LTDBeget\sphinx\configurator\exceptions\ConfigurationException */ public static function serialize(Configuration $configuration) : string { return json_encode(ArraySerializer::serialize($configuration)); }