Пример #1
0
 /**
  * @param string $type
  * @param string|null $fileName
  *
  * @return string
  */
 public function render($type, $fileName = null)
 {
     $generator = new StringGenerator();
     if ($fileName === null) {
         $fileName = sys_get_temp_dir() . '/' . $generator->generateRandomString();
     }
     $this->graph->export($type, $fileName);
     return file_get_contents($fileName);
 }