MiniAsset\Cli\BaseTask::main PHP Method

main() public method

Execute the task given a set of CLI arguments.
public main ( array $argv ) : integer
$argv array The arguments to use.
return integer
    public function main($argv)
    {
        $this->addArguments();
        try {
            $this->cli->arguments->parse($argv);
        } catch (\Exception $e) {
            $this->cli->usage();
            return 0;
        }
        if ($this->cli->arguments->get('help')) {
            $this->cli->usage();
            return 0;
        }
        return $this->execute();
    }