static function setLogLevel($logLevel) { MegaApi::setLogLevel($logLevel); }
$this->setDescription('Exit the app'); } protected function execute(InputInterface $input, OutputInterface $output) { exit(0); } } class QuitCommand extends ExitCommand { protected function configure() { $this->setName('quit'); $this->setDescription('Exit the app'); } } MegaApi::setLogLevel(MegaApi::LOG_LEVEL_ERROR); $applistener = new AppListener(); $megaapi = new MegaApiPHP("API_KEY", "PHP megacli"); $megaapi->addListener($applistener); $application = new Application('MEGA', 'PHP'); $application->add(new LoginCommand()); $application->add(new LogoutCommand()); $application->add(new LsCommand()); $application->add(new MkdirCommand()); $application->add(new CdCommand()); $application->add(new PwdCommand()); $application->add(new RmCommand()); $application->add(new GetCommand()); $application->add(new PutCommand()); $application->add(new ExitCommand()); $application->add(new QuitCommand());