2019-12-05 21:25:58 +01:00
|
|
|
<?php namespace Todaymade\Daux\Format\Confluence;
|
|
|
|
|
|
|
|
use Todaymade\Daux\BaseConfig;
|
|
|
|
|
|
|
|
class Config extends BaseConfig
|
|
|
|
{
|
2020-04-22 21:55:53 +02:00
|
|
|
public function shouldAutoDeleteOrphanedPages()
|
|
|
|
{
|
2019-12-07 11:22:40 +01:00
|
|
|
if ($this->hasValue('delete')) {
|
|
|
|
return $this->getValue('delete');
|
2019-12-05 21:25:58 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2020-04-22 21:55:53 +02:00
|
|
|
public function getUpdateThreshold()
|
|
|
|
{
|
2019-12-07 11:22:40 +01:00
|
|
|
return $this->hasValue('update_threshold') ? $this->getValue('update_threshold') : 2;
|
2019-12-05 21:25:58 +01:00
|
|
|
}
|
|
|
|
|
2020-04-22 21:55:53 +02:00
|
|
|
public function getPrefix()
|
|
|
|
{
|
2019-12-07 11:22:40 +01:00
|
|
|
return $this->getValue('prefix');
|
2019-12-05 21:25:58 +01:00
|
|
|
}
|
|
|
|
|
2020-04-22 21:55:53 +02:00
|
|
|
public function getBaseUrl()
|
|
|
|
{
|
2019-12-07 11:22:40 +01:00
|
|
|
return $this->getValue('base_url');
|
2019-12-05 21:25:58 +01:00
|
|
|
}
|
|
|
|
|
2020-04-22 21:55:53 +02:00
|
|
|
public function getUser()
|
|
|
|
{
|
2019-12-07 11:22:40 +01:00
|
|
|
return $this->getValue('user');
|
2019-12-05 21:25:58 +01:00
|
|
|
}
|
|
|
|
|
2020-04-22 21:55:53 +02:00
|
|
|
public function getPassword()
|
|
|
|
{
|
2019-12-07 11:22:40 +01:00
|
|
|
return $this->getValue('pass');
|
2019-12-05 21:25:58 +01:00
|
|
|
}
|
|
|
|
|
2020-04-22 21:55:53 +02:00
|
|
|
public function getSpaceId()
|
|
|
|
{
|
2019-12-07 11:22:40 +01:00
|
|
|
return $this->getValue('space_id');
|
2019-12-05 21:25:58 +01:00
|
|
|
}
|
|
|
|
|
2020-04-22 21:55:53 +02:00
|
|
|
public function hasAncestorId()
|
|
|
|
{
|
2019-12-07 11:22:40 +01:00
|
|
|
return $this->hasValue('ancestor_id');
|
2019-12-05 21:25:58 +01:00
|
|
|
}
|
|
|
|
|
2020-04-22 21:55:53 +02:00
|
|
|
public function getAncestorId()
|
|
|
|
{
|
2019-12-07 11:22:40 +01:00
|
|
|
return $this->getValue('ancestor_id');
|
2019-12-05 21:25:58 +01:00
|
|
|
}
|
|
|
|
|
2020-04-22 21:55:53 +02:00
|
|
|
public function setAncestorId($value)
|
|
|
|
{
|
2019-12-07 11:22:40 +01:00
|
|
|
$this->setValue('ancestor_id', $value);
|
2019-12-05 21:25:58 +01:00
|
|
|
}
|
|
|
|
|
2020-04-22 21:55:53 +02:00
|
|
|
public function hasRootId()
|
|
|
|
{
|
2019-12-07 11:22:40 +01:00
|
|
|
return $this->hasValue('root_id');
|
2019-12-05 21:25:58 +01:00
|
|
|
}
|
|
|
|
|
2020-04-22 21:55:53 +02:00
|
|
|
public function getRootId()
|
|
|
|
{
|
2019-12-07 11:22:40 +01:00
|
|
|
return $this->getValue('root_id');
|
2019-12-05 21:25:58 +01:00
|
|
|
}
|
|
|
|
|
2020-04-22 21:55:53 +02:00
|
|
|
public function hasHeader()
|
|
|
|
{
|
2019-12-07 11:22:40 +01:00
|
|
|
return $this->hasValue('header');
|
2019-12-05 21:25:58 +01:00
|
|
|
}
|
|
|
|
|
2020-04-22 21:55:53 +02:00
|
|
|
public function getHeader()
|
|
|
|
{
|
2019-12-07 11:22:40 +01:00
|
|
|
return $this->getValue('header');
|
2019-12-05 21:25:58 +01:00
|
|
|
}
|
|
|
|
}
|