PK
œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
Notice: ob_end_clean(): Failed to delete buffer. No buffer to delete in /home/telusvwg/public_html/da754d/index.php on line 8
| Dir : /home/telusvwg/techinnovo.co/wp-content/plugins/really-simple-ssl/core/app/Traits/ |
| Server: Linux premium279.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64 IP: 66.29.132.192 |
| Dir : //home/telusvwg/techinnovo.co/wp-content/plugins/really-simple-ssl/core/app/Traits/HasViews.php |
<?php
declare(strict_types=1);
namespace ReallySimplePlugins\RSS\Core\Traits;
use ReallySimplePlugins\RSS\Core\Bootstrap\App;
use ReallySimplePlugins\RSS\Core\Support\Helpers\Storages\EnvironmentConfig;
trait HasViews
{
/**
* Method for returning the desired view as a string
* @throws \LogicException
*/
public function view(string $path, array $variables = [], string $extension = 'php'): string
{
$env = App::getInstance()->get(EnvironmentConfig::class);
$basePath = $env->getString('plugin.view_path');
$filePath = realpath($basePath . $path . '.' . $extension);
// Someone is doing something dirty
if (($filePath === false) || (strpos($filePath, $basePath) !== 0)) {
throw new \LogicException('Given path is not valid: ' . esc_html($filePath));
}
if (empty($filePath) || (file_exists($filePath) === false) || (is_readable($filePath) === false)) {
return '';
}
extract($variables);
ob_start();
require $filePath;
return ob_get_clean();
}
/**
* Method for outputting the desired view.
*
* @internal we can ignore the phpcs error because we validate in
* {@see view} that the executed path is in our plugin. And we
* escape all variables in our views, so we have full control.
*/
public function render(string $path, array $variables = [], string $extension = 'php'): void
{
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo $this->view($path, $variables, $extension);
}
}