Remove get_app() in favor of DI::app()

This commit is contained in:
nupplaPhil 2020-01-04 23:42:01 +01:00
parent 5d20cd7e16
commit f0eea6f875
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
26 changed files with 110 additions and 97 deletions

View file

@ -2,6 +2,8 @@
namespace Friendica\Console;
use Friendica\App;
/**
* Read a strings.php file and create messages.po in the same directory
*
@ -15,6 +17,16 @@ class PhpToPo extends \Asika\SimpleConsole\Console
private $normBaseMsgIds = [];
const NORM_REGEXP = "|[\\\]|";
/** @var App */
private $app;
public function __construct(App $app, array $argv = null)
{
parent::__construct($argv);
$this->app = $app;
}
protected function getHelp()
{
$help = <<<HELP
@ -51,7 +63,7 @@ HELP;
throw new \Asika\SimpleConsole\CommandArgsException('Too many arguments');
}
$a = \get_app();
$a = $this->app;
$phpfile = realpath($this->getArgument(0));