appwrite/src/Appwrite/Task/Tasks.php

25 lines
466 B
PHP
Raw Normal View History

2022-07-08 02:27:06 +00:00
<?php
namespace Appwrite\Task;
use Utopia\CLI\CLI;
use Appwrite\Task\Usage;
use Appwrite\Task\Version;
class Tasks {
2022-07-08 02:36:54 +00:00
protected CLI $cli;
2022-07-08 02:27:06 +00:00
2022-07-08 02:36:54 +00:00
public function init(): Tasks
2022-07-08 02:27:06 +00:00
{
2022-07-08 02:36:54 +00:00
$this->cli = new CLI();
$this->cli->addTask(Vars::getTask());
$this->cli->addTask(Usage::getTask());
$this->cli->addTask(Version::getTask());
return $this;
2022-07-08 02:27:06 +00:00
}
2022-07-08 02:36:54 +00:00
public function run(): CLI
2022-07-08 02:27:06 +00:00
{
2022-07-08 02:36:54 +00:00
return $this->cli->run();
2022-07-08 02:27:06 +00:00
}
}