Add accessor for App->args in App and BaseModule

2022.09-rc
Hypolite Petovan 2019-10-07 14:10:30 -04:00
rodzic 5f80180b47
commit 11ad0acd28
2 zmienionych plików z 19 dodań i 1 usunięć

Wyświetl plik

@ -132,6 +132,16 @@ class App
*/ */
private $process; private $process;
/**
* Returns the arguments of the query
*
* @return Arguments
*/
public function getArgs()
{
return $this->args;
}
/** /**
* Returns the current config cache of this node * Returns the current config cache of this node
* *

Wyświetl plik

@ -120,7 +120,7 @@ abstract class BaseModule extends BaseObject
$a = \get_app(); $a = \get_app();
$x = explode('.', $hash); $x = explode('.', $hash);
if (time() > (IntVal($x[0]) + $max_livetime)) { if (time() > (intval($x[0]) + $max_livetime)) {
return false; return false;
} }
@ -155,4 +155,12 @@ abstract class BaseModule extends BaseObject
throw new \Friendica\Network\HTTPException\ForbiddenException(); throw new \Friendica\Network\HTTPException\ForbiddenException();
} }
} }
/**
* @return App\Arguments
*/
protected static function getArgs()
{
return self::getApp()->getArgs();
}
} }