]> git.mxchange.org Git - friendica.git/blobdiff - src/Console/PhpToPo.php
Remove deprecated code
[friendica.git] / src / Console / PhpToPo.php
index d73c7f4ab6b79d90f03a63a7f76556479f54a05d..b88ef023eab600739fe1f9abe0a255a879193711 100644 (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));