Forked from cmuench/Run n98-magerun commands within a command
Last active
December 15, 2015 19:08
-
-
Save mzeis/5308602 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$input = new StringInput('cache:flush'); | |
// ensure that n98-magerun doesn't stop after first command | |
$this->getApplication()->setAutoExit(false); | |
// without output | |
$this->getApplication()->run($input, new NullOutput()); | |
// with output | |
$this->getApplication()->run($input, $output); | |
// reactivate auto-exit | |
$this->getApplication()->setAutoExit(true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment