You are here

function _pdf_export_get_scheme_wrapper in PDF Export 7

Returns the configured scheme wrapper.

Return value

DrupalStreamWrapper|bool Returns a new stream wrapper object appropriate for the configured $scheme. FALSE is returned if no registered handler could be found.

2 calls to _pdf_export_get_scheme_wrapper()
pdf_export_download in ./pdf_export.module
Apply the headers for PDF download.
pdf_export_render in ./pdf_export.module
Handle the html as PDF.

File

./pdf_export.module, line 294
PDF Export module.

Code

function _pdf_export_get_scheme_wrapper() {
  $scheme = file_stream_wrapper_get_instance_by_scheme(variable_get('pdf_export_scheme', 'temporary'));
  if (empty($scheme)) {
    return FALSE;
  }
  $scheme
    ->setUri($scheme
    ->getUri() . variable_get('pdf_export_folder', 'pdf_export'));
  return $scheme;
}