runPhpScriptInBackground() публичный статический Метод

public static runPhpScriptInBackground ( $script, $arguments = "", $outputFile = null ) : string
$script
$arguments
$outputFile
Результат string
Пример #1
0
 /**
  *
  */
 public function convert()
 {
     $this->save();
     Console::runPhpScriptInBackground(realpath(PIMCORE_PATH . DIRECTORY_SEPARATOR . "cli" . DIRECTORY_SEPARATOR . "console.php"), "internal:video-converter " . $this->getProcessId());
 }
Пример #2
0
 public function sendAction()
 {
     $document = Document\Newsletter::getById($this->getParam("id"));
     if (Tool\TmpStore::get($document->getTmpStoreId())) {
         throw new Exception("newsletter sending already in progress, need to finish first.");
     }
     $document = Document\Newsletter::getById($this->getParam("id"));
     Tool\TmpStore::add($document->getTmpStoreId(), ['documentId' => $document->getId(), 'addressSourceAdapterName' => $this->getParam("addressAdapterName"), 'adapterParams' => json_decode($this->getParam("adapterParams"), true), 'inProgress' => false, 'progress' => 0], 'newsletter');
     \Pimcore\Tool\Console::runPhpScriptInBackground(realpath(PIMCORE_PATH . DIRECTORY_SEPARATOR . "cli" . DIRECTORY_SEPARATOR . "console.php"), "internal:newsletter-document-send " . escapeshellarg($document->getTmpStoreId()) . " " . escapeshellarg(\Pimcore\Tool::getHostUrl()), PIMCORE_LOG_DIRECTORY . DIRECTORY_SEPARATOR . "newsletter-sending-output.log");
     $this->_helper->json(["success" => true]);
 }
Пример #3
0
 public function sendAction()
 {
     $letter = Newsletter\Config::getByName($this->getParam("name"));
     if ($letter) {
         Tool\Console::runPhpScriptInBackground(realpath(PIMCORE_PATH . DIRECTORY_SEPARATOR . "cli" . DIRECTORY_SEPARATOR . "console.php"), "internal:newsletter-send " . escapeshellarg($letter->getName()) . " " . escapeshellarg(Tool::getHostUrl()));
     }
     $this->_helper->json(["success" => true]);
 }