{
protected $page;
protected $out;
+ protected $force = false;
- public function __construct($out, $page, $format = 'jpg', $resolution = 150, $withGraphics = true, $withTexts = true, $version = 'html')
+ public function __construct($out, $page, $format = 'jpg', $resolution = 150, $withGraphics = true, $withTexts = true, $version = 'html', $force = false)
{
$this->setOut($out);
$this->setPage($page);
+ $this->setForce(!!$force);
parent::__construct($format, $resolution, $withGraphics, $withTexts, $version);
}
+ /**
+ * @return bool
+ */
+ public function isForce(): bool
+ {
+ return $this->force;
+ }
+
+ /**
+ * @param bool $force
+ */
+ public function setForce(bool $force): void
+ {
+ $this->force = $force;
+ }
+
/**
* @param mixed $page
*/
return $this->page;
}
- public function getOut()
+ public function getDistantOut()
{
return $this->out;
}
public function getLocalOut()
{
- return str_replace('/data1/extranet/www/fluidbook/docs/', realpath(__DIR__ . '/../files/').'/',$this->getOut());
+ return $this->getOut();
+ }
+
+ public function getOut()
+ {
+ return str_replace('/data1/extranet/www/fluidbook/docs/', realpath(__DIR__ . '/../files/') . '/', $this->getDistantOut());
}
/**
public function process()
{
-
+ return $this->getPath($this->isForce());
}