/** * Get the HTML temporary folder (when api user give HTML content) * And create it if necessary * * @return string The absolute HTML temporary folder's path * @access private * @static * @since 1.0.0 */ private static function getHtmlTmpFolder() { if (ApiPrint::$html_tmp_folder === null) { $folder = PRINT_TMP . '/html'; if (file_exists($folder) === false || is_dir($folder) === false) { if (mkdir($folder, 0777, true) === false) { throw new Exception('Impossible to create HTML temp folder'); } } ApiPrint::$html_tmp_folder = $folder; } return ApiPrint::$html_tmp_folder; }