Ejemplo n.º 1
0
 /**
  * Encode array to JSON.
  *
  * @param array $document
  *
  * @return string
  */
 protected function encodeToJson(array $document)
 {
     return $this->encoderOptions === null ? json_encode($document) : json_encode($document, $this->encoderOptions->getOptions(), $this->encoderOptions->getDepth());
 }
Ejemplo n.º 2
0
 /**
  * @param DocumentInterface $docWriter
  */
 private function configureUrlPrefix(DocumentInterface $docWriter)
 {
     $this->encoderOptions !== null && $this->encoderOptions->getUrlPrefix() !== null ? $docWriter->setUrlPrefix($this->encoderOptions->getUrlPrefix()) : null;
 }