<?php
/**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
/**
* @return string The whole command of this call
*/
- public function getCommand()
+ public function getCommand(): string
{
return $this->command;
}
/**
* @return string The module name based on the arguments
+ * @deprecated 2022.12 - With the new (sub-)routes, it's not trustworthy anymore, use the ModuleClass instead
+ * @see Router::getModuleClass()
*/
public function getModuleName(): string
{
/**
* @return array All arguments of this call
*/
- public function getArgv()
+ public function getArgv(): array
{
return $this->argv;
}
/**
* @return string The used HTTP method
*/
- public function getMethod()
+ public function getMethod(): string
{
return $this->method;
}
/**
* @return int The count of arguments of this call
*/
- public function getArgc()
+ public function getArgc(): int
{
return $this->argc;
}
*
* @return bool if the argument position exists
*/
- public function has(int $position)
+ public function has(int $position): bool
{
return array_key_exists($position, $this->argv);
}
*
* @return Arguments The determined arguments
*/
- public function determine(array $server, array $get)
+ public function determine(array $server, array $get): Arguments
{
// removing leading / - maybe a nginx problem
$server['QUERY_STRING'] = ltrim($server['QUERY_STRING'] ?? '', '/');