mikehaertl\wkhtmlto\Pdf::processOptions PHP Метод

processOptions() защищенный Метод

protected processOptions ( array $options = [] ) : array
$options array list of options as name/value pairs
Результат array options with raw content converted to tmp files where neccessary
    protected function processOptions($options = array())
    {
        foreach ($options as $key => $val) {
            // header-/footer-html expect a URL or a file name, so we need to create a tmp file for HTML content
            if (is_string($val) && preg_match('/^(header|footer)-html$/', $key)) {
                defined('PHP_MAXPATHLEN') || define('PHP_MAXPATHLEN', 255);
                $isFile = strlen($val) <= PHP_MAXPATHLEN ? is_file($val) : false;
                if (!($isFile || preg_match('/^(https?:)?\\/\\//i', $val) || $val === strip_tags($val))) {
                    $options[$key] = new File($val, '.html', self::TMP_PREFIX, $this->tmpDir);
                }
            }
        }
        return $options;
    }