X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FApp%2FMode.php;h=4a1213ae12933cdf48e29d1d96a7e82af245f8ee;hb=c95d47b0b4d01552804ebcf26e5ae42fc576fc60;hp=e19de8f07f4feaba6555f4f6b9394ee37ef9b7f8;hpb=2bfd9851d30b56821e042c6882db84ec62fd8a2a;p=friendica.git diff --git a/src/App/Mode.php b/src/App/Mode.php index e19de8f07f..4a1213ae12 100644 --- a/src/App/Mode.php +++ b/src/App/Mode.php @@ -1,6 +1,6 @@ mode & $mode) > 0; } + /** + * Set the execution mode + * + * @param integer $executor Execution Mode + * @return void + */ + public function setExecutor(int $executor) + { + $this->executor = $executor; + + // Daemon and worker are always backend + if (in_array($executor, [self::DAEMON, self::WORKER])) { + $this->isBackend = true; + } + } + + /*isBackend = true;* + * get the execution mode + * + * @return int Execution Mode + */ + public function getExecutor() + { + return $this->executor; + } /** * Install mode is when the local config file is missing or the DB schema hasn't been installed yet.