setTimeZone('Europe/Amsterdam'); $configurator->setTempDirectory(dirname(__DIR__) . DIRECTORY_SEPARATOR . 'temp'); $configurator->setLogDirectory(dirname(__DIR__). DIRECTORY_SEPARATOR . 'log'); // Enable components // WebComponent $webAppComponent = new WebAppComponent(); $configurator->addComponent($webAppComponent); // Add directories $configurator->addDirectory(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Config', 'config', Priority::HIGH); $configurator->addDirectory(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Helper', 'helpers', Priority::HIGH); $configurator->addDirectory(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Library', 'libraries', Priority::HIGH); $configurator->addDirectory(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Plugin', 'plugins', Priority::HIGH); $configurator->addDirectory(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Controller', 'controllers', Priority::HIGH); $configurator->addDirectory(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'View', 'views', Priority::HIGH); $configurator->addDirectory(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Model', 'models', Priority::HIGH); $configurator->addDirectory(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Layout', 'layouts', Priority::NORMAL); // Debug $configurator->enableDebugMode()->setDebugAddress('ALL'); $container = $configurator->createContainer(); //\FuzeWorks\Logger::enableScreenLog(); // Prepare arguments $script = array_shift($argv); $taskID = array_shift($argv); $taskID = base64_decode($taskID); $mode = trim(array_shift($argv)); $post = ($mode === 'post' ? true : false); // RUN THE APP /** @var Tasks $lib */ $lib = $container->libraries->get('tasks'); $worker = $lib->getWorker(); $worker->run($taskID, $post);