summaryrefslogtreecommitdiff
path: root/src/helpers.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/helpers.php')
-rw-r--r--src/helpers.php17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/helpers.php b/src/helpers.php
index 64ca9ec8..111141e4 100644
--- a/src/helpers.php
+++ b/src/helpers.php
@@ -3,10 +3,11 @@
use Engelsystem\Application;
use Engelsystem\Config\Config;
+use Engelsystem\Helpers\Authenticator;
use Engelsystem\Helpers\Translator;
use Engelsystem\Http\Request;
use Engelsystem\Http\Response;
-use Engelsystem\Http\UrlGenerator;
+use Engelsystem\Http\UrlGeneratorInterface;
use Engelsystem\Renderer\Renderer;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
@@ -16,13 +17,21 @@ use Symfony\Component\HttpFoundation\Session\SessionInterface;
* @param string $id
* @return mixed|Application
*/
-function app($instance_id = null)
+function app($id = null)
{
- if (is_null($instance_id)) {
+ if (is_null($id)) {
return Application::getInstance();
}
- return Application::getInstance()->get($instance_id);
+ return Application::getInstance()->get($id);
+}
+
+/**
+ * @return Authenticator
+ */
+function auth()
+{
+ return app('authenticator');
}
/**