Definition at line 9 of file ppyrd.base.php.
ppyrd::__construct |
( |
|
$db | ) |
|
constructor
Definition at line 24 of file ppyrd.base.php.
26 $this->
output(
"checking setup");
30 if (file_exists(
'/data/scan/paperyardDirectoryNotMounted.txt'))
32 $warning[]=
"scan folder not properly mounted. Please specify /data/scan in docker run command.\n";
34 if (file_exists(
'/data/inbox/paperyardDirectoryNotMounted.txt'))
36 $warning[]=
"inbox folder not properly mounted. Please specify /data/inbox in docker run command.\n";
38 if (file_exists(
'/data/outbox/paperyardDirectoryNotMounted.txt'))
40 $warning[]=
"outbox folder not properly mounted. Please specify /data/outbox in docker run command.\n";
42 if (file_exists(
'/data/sort/paperyardDirectoryNotMounted.txt'))
44 $warning[]=
"sort folder not properly mounted. Please specify /sort/outbox in docker run command.\n";
46 if (file_exists(
'/data/database/paperyardDirectoryNotMounted.txt'))
48 $warning[]=
"database folder not properly mounted. Please specify /data/database in docker run command.\n";
50 $this->warning = $warning;
51 $warningMessage = join($warning,
"");
53 echo
"docker run not properly set:" . $warningMessage;
output($string, $debug=0)
outputs string
ppyrd::checkCliVsWebserver |
( |
| ) |
|
Definition at line 57 of file ppyrd.base.php.
59 if (
"cli" == php_sapi_name())
61 $this->
output(
"Program call from CLI detected.");
62 if ($this->db->getConfigValue(
'enableCron')==0) {
63 $this->
output(
"please enable cron in config");
67 $this->
output(
"Program call from Webserver detected.");
output($string, $debug=0)
outputs string
ppyrd::output |
( |
|
$string, |
|
|
|
$debug = 0 |
|
) |
| |
outputs string
- Bug:
- no debug handling implemented yet. https://github.com/tlwt/paperyard/issues/10
- Parameters
-
string | $string | to output |
int | $debug | set to 1 to debug |
Definition at line 78 of file ppyrd.base.php.
81 $logProgram = basename($_SERVER[
'SCRIPT_NAME']);
82 echo
"$logProgram: $string\n";
84 $this->db->exec(
"INSERT INTO logShell (logProgram, logContent) VALUES ('$logProgram','$string');");
The documentation for this class was generated from the following file: