Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/HuasoFoundries/phpPgAdmin6.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/traits/HelperTrait.php')
-rw-r--r--src/traits/HelperTrait.php39
1 files changed, 2 insertions, 37 deletions
diff --git a/src/traits/HelperTrait.php b/src/traits/HelperTrait.php
index 347366d1..e7c3d1ef 100644
--- a/src/traits/HelperTrait.php
+++ b/src/traits/HelperTrait.php
@@ -19,29 +19,6 @@ namespace PHPPgAdmin\Traits;
trait HelperTrait
{
/**
- * static reference to subfolder in which the app is running.
- *
- * @var null|string
- */
- public static $subFolder = null;
-
- /**
- * Gets the subfolder.
- *
- * @param string $path The path
- *
- * @return string the subfolder
- */
- public function getSubfolder(string $path = ''): string
- {
- if (null === self::$subFolder) {
- self::$subFolder = $this->container->subfolder;
- }
-
- return \implode(\DIRECTORY_SEPARATOR, [self::$subFolder, $path]);
- }
-
- /**
* Halts the execution of the program. It's like calling exit() but using builtin Slim Exceptions.
*
* @param string $msg The message to show to the user
@@ -50,10 +27,10 @@ trait HelperTrait
*/
public function halt($msg = 'An error has happened'): void
{
- $body = $this->container->responseobj->getBody();
+ $body = \responseInstance()->getBody();
$body->write($msg);
- throw new \Slim\Exception\SlimException($this->container->requestobj, $this->container->responseobj);
+ throw new \Slim\Exception\SlimException(\requestInstance(), \responseInstance());
}
public static function getBackTrace($offset = 0)
@@ -173,18 +150,6 @@ trait HelperTrait
}
/**
- * Returns a string with html <br> variant replaced with a new line.
- *
- * @param string $msg message to parse (<br> separated)
- *
- * @return string parsed message (linebreak separated)
- */
- public static function br2ln($msg)
- {
- return \str_replace(['<br>', '<br/>', '<br />'], \PHP_EOL, $msg);
- }
-
- /**
* Receives N parameters and sends them to the console adding where was it called from.
*
* @param array<int, mixed> $args