/** * Startup the phpThumb service. Must run setInput and setOptions first. */ public function initializeService() { $this->phpThumb->config = array_merge($this->phpThumb->config, $this->options); $this->phpThumb->initialize(); $this->phpThumb->setParameter('config_cache_directory', $this->config['cachePath']); $this->phpThumb->setParameter('config_allow_src_above_phpthumb', true); $this->phpThumb->setParameter('allow_local_http_src', true); $this->phpThumb->setParameter('config_document_root', $this->modx->context->getOption('base_path', MODX_BASE_PATH, $this->config)); $this->phpThumb->setCacheDirectory(); $this->phpThumb->set($this->input); }