mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-08 10:48:13 +00:00
Expand documentation for Helper directory.
This commit is contained in:
@@ -35,14 +35,14 @@ use Route;
|
||||
*/
|
||||
class Help implements HelpInterface
|
||||
{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
/** @var string The cache key */
|
||||
public const CACHEKEY = 'help_%s_%s';
|
||||
/** @var string */
|
||||
/** @var string The user agent. */
|
||||
protected $userAgent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36';
|
||||
|
||||
/**
|
||||
* Get from cache.
|
||||
*
|
||||
* @param string $route
|
||||
* @param string $language
|
||||
*
|
||||
@@ -56,12 +56,14 @@ class Help implements HelpInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Get text from GitHub.
|
||||
*
|
||||
* @param string $route
|
||||
* @param string $language
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getFromGithub(string $route, string $language): string
|
||||
public function getFromGitHub(string $route, string $language): string
|
||||
{
|
||||
$uri = sprintf('https://raw.githubusercontent.com/firefly-iii/help/master/%s/%s.md', $language, $route);
|
||||
Log::debug(sprintf('Trying to get %s...', $uri));
|
||||
@@ -89,6 +91,8 @@ class Help implements HelpInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Do we have the route?
|
||||
*
|
||||
* @param string $route
|
||||
*
|
||||
* @return bool
|
||||
@@ -99,6 +103,8 @@ class Help implements HelpInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Is in cache?
|
||||
*
|
||||
* @param string $route
|
||||
* @param string $language
|
||||
*
|
||||
@@ -119,6 +125,8 @@ class Help implements HelpInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Put help text in cache.
|
||||
*
|
||||
* @param string $route
|
||||
* @param string $language
|
||||
* @param string $content
|
||||
|
||||
Reference in New Issue
Block a user