/home
/evuc
/live
/releases
/20220124095935
/vendor
/buxus
/image-processor
/src
/Factory.php
{
$config = $this->getConfig();
if (Arr::has($config['tags'], $tag)) {
return [
'tag' => $tag,
'params' => [],
];
}
$parts = explode('.', $tag);
$keyPrefix = '';
$currentConfig = $config['tags'];
while (count($parts) > 1) {
$key = array_shift($parts);
if (!isset($currentConfig[$key])) {
throw new ConfigNotFound('Unable to find config for tag: ' . $tag);
}
$keyPrefix .= $key . '.';
$currentConfig = $currentConfig[$key];
}
$key = array_shift($parts);
foreach (array_keys($currentConfig) as $tagTemplate) {
if (preg_match('@^' . $tagTemplate . '$@', $key, $matches)) {
return [
'tag' => $keyPrefix . $tagTemplate,
'params' => $matches,
];
}
}
throw new ConfigNotFound('Unable to find config for tag: ' . $tag);
}
/**
Arguments
"Unable to find config for tag: basic.main_logo"
/home
/evuc
/live
/releases
/20220124095935
/vendor
/buxus
/image-processor
/src
/Factory.php
foreach (array_keys($currentConfig) as $tagTemplate) {
if (preg_match('@^' . $tagTemplate . '$@', $key, $matches)) {
return [
'tag' => $keyPrefix . $tagTemplate,
'params' => $matches,
];
}
}
throw new ConfigNotFound('Unable to find config for tag: ' . $tag);
}
/**
* @param $tag
* @return ImageProcessor
*/
protected function constructTag($tag)
{
$result = $this->resolveRealTag($tag);
$configTag = $result['tag'];
$params = $result['params'];
$config = $this->getTagConfig($configTag);
if (is_object($config) && $config instanceof ImageProcessor) {
return $config;
} elseif (is_array($config)) {
if (isset($config['provider'])) {
$providerClass = $config['provider'];
} else {
$providerClass = $this->getDefaultProviderClass();
}
if (!isset($config['operations'])) {
$config = array(
'operations' => $config,
);
}
Arguments
/home
/evuc
/live
/releases
/20220124095935
/vendor
/buxus
/image-processor
/src
/Factory.php
foreach (array_keys($this->defaultOptions) as $key) {
if (isset($config[$key])) {
$this->defaultOptions[$key] = $config[$key];
}
}
}
/**
* @var array
*/
protected $tagCache = array();
/**
* @param string $tag
* @return mixed
*/
public function get($tag)
{
if (!isset($this->tagCache[$tag])) {
$this->tagCache[$tag] = $this->constructTag($tag);
}
return $this->tagCache[$tag];
}
protected function getTagConfig($tag)
{
$config = $this->getConfig();
$tagConfig = Arr::get($config['tags'], $tag);
if ($tagConfig) {
return $tagConfig;
}
throw new ConfigNotFound('Unable to find config for tag: ' . $tag);
}
protected function resolveRealTag($tag)
{
$config = $this->getConfig();
Arguments
/home
/evuc
/live
/releases
/20220124095935
/vendor
/buxus
/image-processor
/src
/process_image.php
<?php
if (preg_match('|/cache/([^/]*)/(.*)$|', $_SERVER['REQUEST_URI'], $args)) {
$tag = $args[1];
$file = urldecode($args[2]);
try {
$processor = \Buxus\ImageProcessor\Factory::getInstance()->get($tag);
$cache = new \Buxus\ImageProcessor\Cache\ImageCache($processor, $file);
$cache->processAndSend();
exit;
} catch (\Buxus\ImageProcessor\Exception\ImageNotFoundException $notFoundException) {
header('HTTP/1.0 404 Not Found');
echo '404 Page not found';
exit;
} catch (Exception $e) {
if (config('buxus_core.C_debug_level') == 1) {
throw $e;
}
}
}
Arguments
/home
/evuc
/live
/releases
/20220124095935
/vendor
/buxus
/core
/src
/Buxus
/Router
/BuxusRouter.php
echo '<html><head><title>maintenance</title></head><body>This BUXUS application is undergoing maintenance. Please try again later</body></html>';
} else {
include $template_path;
}
}
public function dispatch($request_uri) {
if ($this->app->isDownForMaintenance()) {
$this->display503();
exit;
}
$script = $this->getScript($request_uri);
foreach ($this->auto_scripts as $auto_script) {
include($auto_script);
}
if (!empty($script)) {
include($script);
}
if ($this->default_script != $script) {
include($this->default_script);
}
header('HTTP/1.0 404 Not Found');
echo '404 Not Found';
exit;
}
}
Arguments
"/home/evuc/live/releases/20220124095935/vendor/buxus/image-processor/src/process_image.php"
/home
/evuc
/live
/releases
/20220124095935
/public
/buxus.php
<?php
define('BASE_BUXUS_DIR', realpath(__DIR__ . '/../'));
require_once __DIR__ . '/../vendor/autoload.php';
require_once CORE_BUXUS_DIR . '/src/buxus_bootstrap.php';
require_once '../vendor/buxus/legacy-base/buxus/includes/database.php';
$router = app('buxus-router');
$router->dispatch($_SERVER['REQUEST_URI']);
Arguments
"/buxus/images/cache/basic.main_logo/logo_svk_digital7.jpg"