]> git.mxchange.org Git - friendica.git/commitdiff
Add accessor for App->args in App and BaseModule
authorHypolite Petovan <hypolite@mrpetovan.com>
Mon, 7 Oct 2019 18:10:30 +0000 (14:10 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 7 Oct 2019 18:27:46 +0000 (14:27 -0400)
src/App.php
src/BaseModule.php

index c6ed818dd1a8ec23f932a1ef4eb826e8c45f7117..8a36c3bfeb386464c03ec35a030bbab223d09693 100644 (file)
@@ -132,6 +132,16 @@ class App
         */
        private $process;
 
+       /**
+        * Returns the arguments of the query
+        *
+        * @return Arguments
+        */
+       public function getArgs()
+       {
+               return $this->args;
+       }
+
        /**
         * Returns the current config cache of this node
         *
index 0383487abd3614d89f348a82b2c630db9c03fe24..76ed901110651fce562985717a5d6b6ad8d387fa 100644 (file)
@@ -120,7 +120,7 @@ abstract class BaseModule extends BaseObject
                $a = \get_app();
 
                $x = explode('.', $hash);
-               if (time() > (IntVal($x[0]) + $max_livetime)) {
+               if (time() > (intval($x[0]) + $max_livetime)) {
                        return false;
                }
 
@@ -155,4 +155,12 @@ abstract class BaseModule extends BaseObject
                        throw new \Friendica\Network\HTTPException\ForbiddenException();
                }
        }
+
+       /**
+        * @return App\Arguments
+        */
+       protected static function getArgs()
+       {
+               return self::getApp()->getArgs();
+       }
 }