/var/www/vsepansionati.com/modules/listings/views/item/DetailsBlock.php
$this->useBlocksRotation();
$this->setTitle(_t('@listings', 'Details'));
$this->setKey('details');
$this->setTemplate(function ($data) {
return join('', $data['blocks'] ?? []);
});
}
public function blocks()
{
$this->addTemplateBlock('mediaBlock', 'item/media', 'listings', function (Block $block) {
$block->setKey('media');
$block->setTitle(_t('@listings', 'Media'));
$block->prerenderable(false);
});
echo "<pre>";
print_r(array_keys($this->data['blocks']));
echo "</pre>";
$this->addBlock('dynpropsBlock', function () {
/** @var Block $block */
$block = $this->app->make(Block::class);
$block->setKey('dynprops');
$block->setTitle(_t('@', 'Properties'));
$block->setTemplate(function () {
return $this->data['dynprops']['form'] ?: '';
});
return $block;
});
$this->addTemplateBlock('descriptionBlock', 'item/description', 'listings', function (Block $block) {
$block->setKey('description');
$block->setTitle(_t('@listings', 'Description'));
});
}
public function data()
/var/www/vsepansionati.com/modules/listings/views/item/DetailsBlock.php
$this->useBlocksRotation();
$this->setTitle(_t('@listings', 'Details'));
$this->setKey('details');
$this->setTemplate(function ($data) {
return join('', $data['blocks'] ?? []);
});
}
public function blocks()
{
$this->addTemplateBlock('mediaBlock', 'item/media', 'listings', function (Block $block) {
$block->setKey('media');
$block->setTitle(_t('@listings', 'Media'));
$block->prerenderable(false);
});
echo "<pre>";
print_r(array_keys($this->data['blocks']));
echo "</pre>";
$this->addBlock('dynpropsBlock', function () {
/** @var Block $block */
$block = $this->app->make(Block::class);
$block->setKey('dynprops');
$block->setTitle(_t('@', 'Properties'));
$block->setTemplate(function () {
return $this->data['dynprops']['form'] ?: '';
});
return $block;
});
$this->addTemplateBlock('descriptionBlock', 'item/description', 'listings', function (Block $block) {
$block->setKey('description');
$block->setTitle(_t('@listings', 'Description'));
});
}
public function data()
/var/www/vsepansionati.com/bff/view/Block.php
} else {
$this->protected[] = $property->getName();
}
}
# Set parent before init
if (is_array($settings) && array_key_exists('parent', $settings)) {
$this->setParent($settings['parent']);
unset($settings['parent']);
}
$this->setSettings($settings);
if (! $this->language) {
$this->language = Lang::current();
}
$this->init();
$this->blocks();
$this->app->hook('view.block.init', $this);
}
/**
* Set block template
* @param string|callable $template
* @param Module|string|null $controller
* @return static
*/
public function setTemplate($template, $controller = null)
{
/** Extract controller from template names like 'controller::template' */
if (is_string($template) && strpos(trim($template), $this->view::HINT_DELIMITER) > 0) {
$segments = explode($this->view::HINT_DELIMITER, $template);
if (count($segments) === 2) {
[$controller, $template] = $segments;
}
}
/var/www/vsepansionati.com/bff/vendor/illuminate/container/Container.php
return new $concrete;
}
$dependencies = $constructor->getParameters();
// Once we have all the constructor's parameters we can create each of the
// dependency instances and then use the reflection instances to make a
// new instance of this class, injecting the created dependencies in.
try {
$instances = $this->resolveDependencies($dependencies);
} catch (BindingResolutionException $e) {
array_pop($this->buildStack);
throw $e;
}
array_pop($this->buildStack);
return $reflector->newInstanceArgs($instances);
}
/**
* Resolve all of the dependencies from the ReflectionParameters.
*
* @param \ReflectionParameter[] $dependencies
* @return array
*
* @throws \Illuminate\Contracts\Container\BindingResolutionException
*/
protected function resolveDependencies(array $dependencies)
{
$results = [];
foreach ($dependencies as $dependency) {
// If the dependency has an override for this particular build we will use
// that instead as the value. Otherwise, we will continue with this run
// of resolutions and let reflection attempt to determine the result.
if ($this->hasParameterOverride($dependency)) {
$results[] = $this->getParameterOverride($dependency);
/var/www/vsepansionati.com/bff/vendor/illuminate/container/Container.php
$needsContextualBuild = ! empty($parameters) || ! is_null($concrete);
// If an instance of the type is currently being managed as a singleton we'll
// just return an existing instance instead of instantiating new instances
// so the developer can keep using the same objects instance every time.
if (isset($this->instances[$abstract]) && ! $needsContextualBuild) {
return $this->instances[$abstract];
}
$this->with[] = $parameters;
if (is_null($concrete)) {
$concrete = $this->getConcrete($abstract);
}
// We're ready to instantiate an instance of the concrete type registered for
// the binding. This will instantiate the types, as well as resolve any of
// its "nested" dependencies recursively until all have gotten resolved.
if ($this->isBuildable($concrete, $abstract)) {
$object = $this->build($concrete);
} else {
$object = $this->make($concrete);
}
// If we defined any extenders for this type, we'll need to spin through them
// and apply them to the object being built. This allows for the extension
// of services, such as changing configuration or decorating the object.
foreach ($this->getExtenders($abstract) as $extender) {
$object = $extender($object, $this);
}
// If the requested type is registered as a singleton we'll want to cache off
// the instances in "memory" so we can return it later without creating an
// entirely new instance of an object on each subsequent request for it.
if ($this->isShared($abstract) && ! $needsContextualBuild) {
$this->instances[$abstract] = $object;
}
if ($raiseEvents) {
$this->fireResolvingCallbacks($abstract, $object);
/var/www/vsepansionati.com/bff/base/Container.php
<?php
namespace bff\base;
use Illuminate\Container\Container as IlluminateContainer;
use Illuminate\Contracts\Container\BindingResolutionException;
use Illuminate\Support\Str;
class Container extends IlluminateContainer
{
/**
* {@inheritdoc}
*
* @return mixed
*/
protected function resolve($abstract, $parameters = [], $raiseEvents = true)
{
try {
return parent::resolve($abstract, $parameters, $raiseEvents);
} catch (BindingResolutionException $e) {
/**
* Resolve views contract to default view implementation
*/
if (Str::contains($abstract, 'views\contracts')) {
$abstract = Str::replace('views\contracts', 'views', $abstract);
}
return parent::resolve($abstract, $parameters, $raiseEvents);
}
}
}
/var/www/vsepansionati.com/bff/vendor/illuminate/container/Container.php
*
* @throws \Illuminate\Contracts\Container\BindingResolutionException
*/
public function makeWith($abstract, array $parameters = [])
{
return $this->make($abstract, $parameters);
}
/**
* Resolve the given type from the container.
*
* @param string|callable $abstract
* @param array $parameters
* @return mixed
*
* @throws \Illuminate\Contracts\Container\BindingResolutionException
*/
public function make($abstract, array $parameters = [])
{
return $this->resolve($abstract, $parameters);
}
/**
* {@inheritdoc}
*
* @return mixed
*/
public function get($id)
{
try {
return $this->resolve($id);
} catch (Exception $e) {
if ($this->has($id) || $e instanceof CircularDependencyException) {
throw $e;
}
throw new EntryNotFoundException($id, $e->getCode(), $e);
}
}
/var/www/vsepansionati.com/bff/view/Block.php
}, $callback);
}
/**
* Create block instance
* @param string $block class
* @param array $settings
* @return self
*/
public function createBlock(string $block, array $settings = [])
{
$defaults = [
/** pass parent to use it in block::init() */
'parent' => $this,
/** pass extension object to child block */
'extension' => $this->extension,
];
return $this->app->make($block, [
'settings' => array_merge($defaults, $settings)
]);
}
/**
* Validate block class
*/
public static function isValidBlockClass(string $blockClass): bool
{
if ($blockClass === '') {
return false;
}
return interface_exists($blockClass) || class_exists($blockClass);
}
/**
* Block(s) to skip
* @param string|array $key
* @param bool $reset
* @return static
/var/www/vsepansionati.com/bff/view/Block.php
* rotatable options - @see HasBlocksRotation::rotatableSettingsDefault
* @return static
*/
public function addBlock(string $key, $block, $callback = null, array $opts = [])
{
if ($block instanceof self) {
$block->setParent($this);
if ($callback instanceof Closure) {
$callback($block, $key);
}
$this->blocks[$key] = $block;
$this->setRotatableBlockOptions($key, $opts);
return $this;
}
$this->blocks[$key] = function () use ($key, $block, $callback, $opts) {
if ($block instanceof Closure) {
$block = $block($this);
}
if (is_string($block) && static::isValidBlockClass($block)) {
$block = $this->createBlock($block, is_array($callback) ? $callback : []);
}
if ($block instanceof self) {
$this->addBlock($key, $block, $callback, $opts);
return $block;
}
return null;
};
return $this;
}
/**
* Add template block
* @param string $key
* @param string $template
* @param Module|string|null $controller
* @param Closure|null $callback
* @return static
*/
public function addTemplateBlock(string $key, string $template, $controller = null, $callback = null)
/var/www/vsepansionati.com/bff/view/Block.php
} else {
$this->withoutBlocks[] = $key;
}
return $this;
}
/**
* Get sub block by key
* @param string $key
* @param array $opts
* @return Block|null
*/
public function getBlock(string $key, array $opts = [])
{
if (! isset($this->blocks[$key])) {
return null;
}
if (is_callable($this->blocks[$key])) {
$this->blocks[$key] = $this->blocks[$key]();
}
if ($this->withoutBlocks && $this->blocks[$key] instanceof self) {
$this->blocks[$key]->withoutBlock($this->withoutBlocks);
}
if ($this->blocks[$key]) {
$this->blocks[$key]->fillSettings();
} else {
$this->log('Can\'t create block ' . $key . ' for block ' . get_class($this));
}
return $this->blocks[$key];
}
/**
* Set sub block settings and return block instance
* @param string $key
* @param array $settings
* @return Block|null
/var/www/vsepansionati.com/bff/view/Block.php
* @return bool
*/
public function hasBlocks()
{
return ! empty($this->blocks);
}
/**
* Iterate sub blocks
* @param Closure $callback
* @param array $opts
* @return void
*/
public function blocksIterator(Closure $callback, array $opts = [])
{
foreach ($this->blocks as $key => $block) {
if (in_array($key, $this->withoutBlocks, true)) {
continue;
}
$block = $this->getBlock($key, $opts);
if ($block instanceof self) {
if ($callback($block, $key) === false) {
break;
}
}
}
}
/**
* Add content wrapper
* @param callable|string $template
* @param string $controller
* @param array $opts
* @return static
*/
public function addWrapper($template, $controller = null, array $opts = [])
{
$opts = $this->defaults($opts, [
'contentKey' => 'content',
'data' => [],
/var/www/vsepansionati.com/bff/view/Block.php
}
}
/**
* Gather data before render
* @return void
*/
protected function gatherData()
{
$this->fillSettings();
$this->fillableToData();
$this->data = $this->data();
$this->app->hook('view.block.data', $this, ['data' => & $this->data]);
if (is_array($this->data)) {
$this->blocksIterator(function ($block, $key) {
$this->data[$key] = $block;
});
}
}
/**
* Get block (and sub blocks) data without rendering
* @return array|mixed
*/
public function getData()
{
$this->gatherData();
if (is_array($this->data)) {
foreach ($this->data as $key => $value) {
if ($value instanceof self) {
$this->data[$key] = $value->getData();
}
}
}
return $this->data;
/var/www/vsepansionati.com/bff/view/Block.php
$wrapper['renderOptions'] ?? $this->renderOptions
);
continue;
}
if (is_callable($wrapper['template'])) {
$content = call_user_func($wrapper['template'], $content, $this->data);
}
}
}
return $content;
}
/**
* Render block content
* @return string|mixed
*/
protected function renderContent()
{
$this->gatherData();
# Try to return data
if (! is_array($this->data)) {
if ($this->data instanceof self) {
return $this->data->render();
}
# cancel render
if ($this->beforeRender() === false) {
return '';
}
# string is a render goal
if (is_string($this->data)) {
return $this->data;
}
# throw response
if ($this->data instanceof Response) {
$this->data->throw();
}
if ($this->data instanceof Closure) {
$callback = $this->data;
/var/www/vsepansionati.com/bff/view/Page.php
$this->fillSettings();
}
if ($this->isSubmitAction()) {
if ($response = $this->handleActionRequest('submit')) {
if (is_array($response)) {
return $this->getActionResponse($response);
}
return $response;
}
} else {
if ($response = $this->handleActionRequest()) {
if (is_array($response)) {
return $this->getActionResponse($response);
}
return $response;
}
}
return parent::renderContent();
}
/**
* Init before render to fill seo data used in template (titleh1, breadcrumbs ...)
* @return bool|void
*/
protected function beforeRender()
{
if (parent::beforeRender() === false) {
return false;
}
if ($this->skipSeo) {
return;
}
if (is_array($this->data)) {
$this->seoSettings();
$this->seo();
$this->seoStructured();
/var/www/vsepansionati.com/bff/view/Block.php
{
$this->beforeRenderRotation();
}
/**
* After render
* @return string|mixed
*/
protected function afterRender($content)
{
return $content;
}
/**
* Render block
* @return string|mixed
*/
public function render()
{
$content = $this->renderContent();
if (! is_string($content)) {
return $content;
}
$content = $this->applyWrappers($content);
$content = $this->afterRender($content);
return $this->app->filter('view.block.render', $content, $this);
}
/**
* Apply content wrappers
* @param string $content
* @return false|mixed|\Psr\Http\Message\ResponseInterface|string
*/
protected function applyWrappers($content)
{
if (! empty($this->wrappers)) {
foreach (array_reverse($this->wrappers) as $wrapper) {
/var/www/vsepansionati.com/bff/base/Router.php
if ($controller && $action) {
return $this->get(static::DIRECT_ROUTE, '', $controller . '/' . $action . '/');
}
return null;
}
/**
* Gather route middleware
* @param \bff\http\Request $request
* @param \bff\base\Route $route
* @return \bff\http\Response|mixed
*/
public function runRoute(Request $request, Route $route)
{
try {
# Run
$response = $route->run($request);
if ($response instanceof Block) {
$response = $response->render();
}
} catch (ResponseException $e) {
# Special type of exception in cases where unable to implement proper "return Response"
return $e->getResponse();
} catch (ModelRecordNotFoundException $e) {
if (Errors::no()) {
Errors::unknownRecord();
}
if ($request->isAJAX()) {
return Response::json(['data' => [], 'errors' => Errors::get()]);
}
} catch (NotFoundException $e) {
return Response::notFound($e->getResponse());
} catch (Throwable $e) {
if (! bff()->isDebug()) {
Errors::logException($e);
return Errors::error404();
}
return Errors::handleException($e);
}
/var/www/vsepansionati.com/bff/base/Application.php
if (is_string($middleware) && array_key_exists($middleware, $this->middlewareGroups)) {
foreach ($this->middlewareGroups[$middleware] as $key => $value) {
if (is_string($key)) {
$stack[$key] = $value;
} else {
$stack[] = $value;
}
}
} else {
$stack[] = $middleware;
}
}
if ($this->adminPanel()) {
# Admin
$stack[] = ['callback' => \bff\middleware\AdminPanel::class, 'priority' => 100];
} else {
# Frontend ...
$stack[] = ['callback' => function (Request $request, $next) use ($route) {
# Run
$response = $this->router()->runRoute($request, $route);
# Html + Layout
if (is_string($response)) {
return $this->view()->layoutResponse([
'centerblock' => $this->view()->vueRender(
$this->tags()->process($response)
),
]);
}
# Other response types
return Response::responsify($response);
}, 'priority' => 100];
}
} else {
if ($this->adminPanel()) {
# Admin
$stack[] = ['callback' => \bff\middleware\StartSession::class, 'priority' => 50];
$stack[] = ['callback' => \bff\middleware\AdminPanel::class, 'priority' => 100];
} else {
# Not found: Frontend ...
$stack[] = function () {
/var/www/vsepansionati.com/bff/vendor/illuminate/pipeline/Pipeline.php
return $this->handleException($passable, $e);
}
};
}
/**
* Get a Closure that represents a slice of the application onion.
*
* @return \Closure
*/
protected function carry()
{
return function ($stack, $pipe) {
return function ($passable) use ($stack, $pipe) {
try {
if (is_callable($pipe)) {
// If the pipe is a callable, then we will call it directly, but otherwise we
// will resolve the pipes out of the dependency container and call it with
// the appropriate method and arguments, returning the results back out.
return $pipe($passable, $stack);
} elseif (! is_object($pipe)) {
[$name, $parameters] = $this->parsePipeString($pipe);
// If the pipe is a string we will parse the string and resolve the class out
// of the dependency injection container. We can then build a callable and
// execute the pipe function giving in the parameters that are required.
$pipe = $this->getContainer()->make($name);
$parameters = array_merge([$passable, $stack], $parameters);
} else {
// If the pipe is already an object we'll just make a callable and pass it to
// the pipe as-is. There is no need to do any extra parsing and formatting
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
/var/www/vsepansionati.com/bff/middleware/StartSession.php
/**
* Handle the given request within session state.
*
* @param \bff\http\Request $request
* @param \Illuminate\Contracts\Session\Session $session
* @param \Closure $next
* @return mixed
*/
protected function handleStatefulRequest(Request $request, $session, Closure $next)
{
// If a session driver has been configured, we will need to start the session here
// so that the data is ready for an application. Note that the Laravel sessions
// do not make use of PHP "native" sessions in any way since they are crappy.
$request->setSession(
$this->startSession($request, $session)
);
$this->collectGarbage($session);
$response = $next($request);
$this->storeCurrentUrl($request, $session);
if ($this->isSecureRequest($request, $session)) {
$response = $this->addCookieToResponse($response, $session);
// Again, if the session has been configured we will need to close out the session
// so that the attributes may be persisted to some storage medium. We will also
// add the session identifier cookie to the application response headers now.
$this->saveSession($request);
}
return $response;
}
/**
* Start the session for the given request.
*
* @param \bff\http\Request $request
* @param \Illuminate\Contracts\Session\Session $session
/var/www/vsepansionati.com/bff/middleware/StartSession.php
*/
public function handle($request, Closure $next)
{
if (! $this->sessionConfigured()) {
return $next($request);
}
# No session for robots
if ($request->isRobot()) {
config::temp('session.driver', 'array');
}
$session = $this->getSession($request);
if (
$this->manager->shouldBlock() ||
($request->route() instanceof Route && $request->route()->locksFor())
) {
return $this->handleRequestWhileBlocking($request, $session, $next);
} else {
return $this->handleStatefulRequest($request, $session, $next);
}
}
/**
* Handle the given request within session state.
*
* @param \bff\http\Request $request
* @param \Illuminate\Contracts\Session\Session $session
* @param \Closure $next
* @return mixed
*/
protected function handleRequestWhileBlocking(Request $request, $session, Closure $next)
{
if (! $request->route() instanceof Route) {
return;
}
$lockFor = $request->route() && $request->route()->locksFor()
? $request->route()->locksFor()
: 10;
/var/www/vsepansionati.com/bff/vendor/illuminate/pipeline/Pipeline.php
// the appropriate method and arguments, returning the results back out.
return $pipe($passable, $stack);
} elseif (! is_object($pipe)) {
[$name, $parameters] = $this->parsePipeString($pipe);
// If the pipe is a string we will parse the string and resolve the class out
// of the dependency injection container. We can then build a callable and
// execute the pipe function giving in the parameters that are required.
$pipe = $this->getContainer()->make($name);
$parameters = array_merge([$passable, $stack], $parameters);
} else {
// If the pipe is already an object we'll just make a callable and pass it to
// the pipe as-is. There is no need to do any extra parsing and formatting
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
};
}
/**
* Parse full pipe string to get name and parameters.
*
* @param string $pipe
* @return array
*/
protected function parsePipeString($pipe)
{
[$name, $parameters] = array_pad(explode(':', $pipe, 2), 2, []);
/var/www/vsepansionati.com/bff/middleware/UserLastActivity.php
use User;
use Users;
use bff\http\Request;
/**
* Marking the user's last activity
* @copyright Tamaranga
*/
class UserLastActivity
{
public function __invoke(Request $request, $next)
{
if (User::logined()) {
$userID = User::id();
# Update last activity
Users::updateUserLastActivity($userID);
}
return $next($request);
}
}
/var/www/vsepansionati.com/bff/vendor/illuminate/pipeline/Pipeline.php
return $pipe($passable, $stack);
} elseif (! is_object($pipe)) {
[$name, $parameters] = $this->parsePipeString($pipe);
// If the pipe is a string we will parse the string and resolve the class out
// of the dependency injection container. We can then build a callable and
// execute the pipe function giving in the parameters that are required.
$pipe = $this->getContainer()->make($name);
$parameters = array_merge([$passable, $stack], $parameters);
} else {
// If the pipe is already an object we'll just make a callable and pass it to
// the pipe as-is. There is no need to do any extra parsing and formatting
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
};
}
/**
* Parse full pipe string to get name and parameters.
*
* @param string $pipe
* @return array
*/
protected function parsePipeString($pipe)
{
[$name, $parameters] = array_pad(explode(':', $pipe, 2), 2, []);
if (is_string($parameters)) {
/var/www/vsepansionati.com/bff/middleware/LoginAuto.php
$userData = Users::model()->userData($userID, ['user_id', 'user_id_ex', 'last_login']);
if (empty($userData)) {
break;
}
if (Users::model()->userIsAdministrator($userID)) {
break;
}
if ($hashFull !== Users::loginAutoHash($userData)) {
break;
}
if (Users::i()->authById($userID) === true) {
break;
}
return Redirect::route('users-login', [
'ref' => $request->url(true),
]);
} while (false);
return $next($request);
}
}
/var/www/vsepansionati.com/bff/vendor/illuminate/pipeline/Pipeline.php
return $pipe($passable, $stack);
} elseif (! is_object($pipe)) {
[$name, $parameters] = $this->parsePipeString($pipe);
// If the pipe is a string we will parse the string and resolve the class out
// of the dependency injection container. We can then build a callable and
// execute the pipe function giving in the parameters that are required.
$pipe = $this->getContainer()->make($name);
$parameters = array_merge([$passable, $stack], $parameters);
} else {
// If the pipe is already an object we'll just make a callable and pass it to
// the pipe as-is. There is no need to do any extra parsing and formatting
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
};
}
/**
* Parse full pipe string to get name and parameters.
*
* @param string $pipe
* @return array
*/
protected function parsePipeString($pipe)
{
[$name, $parameters] = array_pad(explode(':', $pipe, 2), 2, []);
if (is_string($parameters)) {
/var/www/vsepansionati.com/bff/middleware/Offline.php
<?php //ICB0 71:0 81:146c ?><?php //00091
// Copyright Tamaranga. 2014-2022
// All Rights Reserved
echo('No IonCube Loader is installed. Please contact support.');exit(199);
?>
HR+cP+8bn2QA2Zq9NvPH1PIRzDguasZoDf6dEom79qp+zjwDeXHq8BmQEUMlvBzg4JGKz/ltQrgp
+fpNuRafmPbu8Ihp108+ukfC+krynk+5lIkAcAxTpYlnl/BrtWBhQprMqAKuA8kY+VDjRzunwGiX
FMoP6S9fp6dXl5g8rsdTykjMjUw1FxP0B69NNgzkRJZ+mQ+I/zY7G2/bGaPwveRcp7SvXDZCp4w4
EKb0s2c4+r1sHwaJFxZZHf8O4KBvqgE9qmD6ADl7Dc4+K/I8kE1XkfAXOaRNnvbV5/5V6yWtWlmf
Hpx4fgup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X6Dae5LA7jf8hBdKr+fzt1tNOmFKJbV5yuQ2GNMzF4dlkuLE5Inlg87S07Q5V52iuC
MlLx6BfKx6BDBLe2bJWT0xQjd9qzLsFojGgjJy1WP2D9dLPI90xGoy29TEMIfPcdct4bvR0/QV/3
DVP+BlZD1R4dqQjJ9uvVTfO4Y1qIGa2QoAoounPl4eI6R9kaCD9sofdc8kveKjemUdWxkPhSWSn/
/var/www/vsepansionati.com/bff/vendor/illuminate/pipeline/Pipeline.php
return $pipe($passable, $stack);
} elseif (! is_object($pipe)) {
[$name, $parameters] = $this->parsePipeString($pipe);
// If the pipe is a string we will parse the string and resolve the class out
// of the dependency injection container. We can then build a callable and
// execute the pipe function giving in the parameters that are required.
$pipe = $this->getContainer()->make($name);
$parameters = array_merge([$passable, $stack], $parameters);
} else {
// If the pipe is already an object we'll just make a callable and pass it to
// the pipe as-is. There is no need to do any extra parsing and formatting
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
};
}
/**
* Parse full pipe string to get name and parameters.
*
* @param string $pipe
* @return array
*/
protected function parsePipeString($pipe)
{
[$name, $parameters] = array_pad(explode(':', $pipe, 2), 2, []);
if (is_string($parameters)) {
/var/www/vsepansionati.com/app/middleware/SubdomainsValidation.php
break;
}
if (preg_match('/(.*)\.' . preg_quote(SITEHOST) . '/', $host, $matches) <= 0) {
break;
}
if (empty($matches[1])) {
break;
}
if (Geo::urlType() !== Geo::URL_SUBDOMAIN) {
return Errors::error404();
};
$region = Geo::regionDataByKeyword($matches[1]);
if (empty($region)) {
# Could not find region by keyword
return Errors::error404();
}
} while (false);
return $next($request);
}
}
/var/www/vsepansionati.com/bff/vendor/illuminate/pipeline/Pipeline.php
return $pipe($passable, $stack);
} elseif (! is_object($pipe)) {
[$name, $parameters] = $this->parsePipeString($pipe);
// If the pipe is a string we will parse the string and resolve the class out
// of the dependency injection container. We can then build a callable and
// execute the pipe function giving in the parameters that are required.
$pipe = $this->getContainer()->make($name);
$parameters = array_merge([$passable, $stack], $parameters);
} else {
// If the pipe is already an object we'll just make a callable and pass it to
// the pipe as-is. There is no need to do any extra parsing and formatting
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
};
}
/**
* Parse full pipe string to get name and parameters.
*
* @param string $pipe
* @return array
*/
protected function parsePipeString($pipe)
{
[$name, $parameters] = array_pad(explode(':', $pipe, 2), 2, []);
if (is_string($parameters)) {
/var/www/vsepansionati.com/bff/middleware/Cors.php
* @param mixed $next
* @return ResponseInterface
*/
public function __invoke(RequestInterface $request, $next)
{
return $this->handle($request, $next);
}
/**
* Handle request
* @param RequestInterface $request
* @param mixed $next
* @return ResponseInterface
*/
public function handle(RequestInterface $request, $next)
{
# Skip requests without Origin header
if (! $request->hasHeader('Origin')) {
# Not an access control request
return $next($request);
}
# Preflight Request
if ($this->isPreflightRequest($request)) {
return $this->setCorsHeaders($request, ResponseFactory::empty(), true);
}
# Strict request validation
if ($this->strict() && ! $this->isAllowedRequest($request)) {
return ResponseFactory::createResponse(403, $this->options['forbidden_message'] ?? '');
}
return $this->setCorsHeaders($request, $next($request));
}
/**
* Is preflight request
* @param RequestInterface $request
* @return bool
*/
/var/www/vsepansionati.com/bff/vendor/illuminate/pipeline/Pipeline.php
// the appropriate method and arguments, returning the results back out.
return $pipe($passable, $stack);
} elseif (! is_object($pipe)) {
[$name, $parameters] = $this->parsePipeString($pipe);
// If the pipe is a string we will parse the string and resolve the class out
// of the dependency injection container. We can then build a callable and
// execute the pipe function giving in the parameters that are required.
$pipe = $this->getContainer()->make($name);
$parameters = array_merge([$passable, $stack], $parameters);
} else {
// If the pipe is already an object we'll just make a callable and pass it to
// the pipe as-is. There is no need to do any extra parsing and formatting
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
};
}
/**
* Parse full pipe string to get name and parameters.
*
* @param string $pipe
* @return array
*/
protected function parsePipeString($pipe)
{
[$name, $parameters] = array_pad(explode(':', $pipe, 2), 2, []);
/var/www/vsepansionati.com/bff/middleware/FrameGuard.php
<?php
namespace bff\middleware;
use Security;
use bff\http\Request;
/**
* X-Frame-Options
* @copyright Tamaranga
*/
class FrameGuard
{
public function __invoke(Request $request, $next)
{
if (! $request->isPOST()) {
Security::setIframeOptions();
}
return $next($request);
}
}
/var/www/vsepansionati.com/bff/vendor/illuminate/pipeline/Pipeline.php
return $pipe($passable, $stack);
} elseif (! is_object($pipe)) {
[$name, $parameters] = $this->parsePipeString($pipe);
// If the pipe is a string we will parse the string and resolve the class out
// of the dependency injection container. We can then build a callable and
// execute the pipe function giving in the parameters that are required.
$pipe = $this->getContainer()->make($name);
$parameters = array_merge([$passable, $stack], $parameters);
} else {
// If the pipe is already an object we'll just make a callable and pass it to
// the pipe as-is. There is no need to do any extra parsing and formatting
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
};
}
/**
* Parse full pipe string to get name and parameters.
*
* @param string $pipe
* @return array
*/
protected function parsePipeString($pipe)
{
[$name, $parameters] = array_pad(explode(':', $pipe, 2), 2, []);
if (is_string($parameters)) {
/var/www/vsepansionati.com/bff/middleware/TrustedProxies.php
namespace bff\middleware;
use Cache;
use config;
use bff\http\Request;
/**
* Allowed proxies
* @copyright Tamaranga
*/
class TrustedProxies
{
public function __invoke(Request $request, $next)
{
$request->setTrustedProxies([]); // reset state between requests
$trusted = config::get('request.trusted.proxies');
if (is_null($trusted) || $trusted === '') {
return $next($request);
}
if (is_string($trusted)) {
if ($trusted === '*') {
$trusted = [
$request->remoteAddress(false, false) // current IP
];
} else {
$trusted = array_map('trim', explode(',', $trusted));
}
}
if (is_array($trusted)) {
$request->setTrustedProxies(
$this->mixinCloudFlareIps($trusted)
);
}
return $next($request);
}
/var/www/vsepansionati.com/bff/vendor/illuminate/pipeline/Pipeline.php
return $pipe($passable, $stack);
} elseif (! is_object($pipe)) {
[$name, $parameters] = $this->parsePipeString($pipe);
// If the pipe is a string we will parse the string and resolve the class out
// of the dependency injection container. We can then build a callable and
// execute the pipe function giving in the parameters that are required.
$pipe = $this->getContainer()->make($name);
$parameters = array_merge([$passable, $stack], $parameters);
} else {
// If the pipe is already an object we'll just make a callable and pass it to
// the pipe as-is. There is no need to do any extra parsing and formatting
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
};
}
/**
* Parse full pipe string to get name and parameters.
*
* @param string $pipe
* @return array
*/
protected function parsePipeString($pipe)
{
[$name, $parameters] = array_pad(explode(':', $pipe, 2), 2, []);
if (is_string($parameters)) {
/var/www/vsepansionati.com/bff/vendor/illuminate/pipeline/Pipeline.php
public function via($method)
{
$this->method = $method;
return $this;
}
/**
* Run the pipeline with a final destination callback.
*
* @param \Closure $destination
* @return mixed
*/
public function then(Closure $destination)
{
$pipeline = array_reduce(
array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
);
return $pipeline($this->passable);
}
/**
* Run the pipeline and return the result.
*
* @return mixed
*/
public function thenReturn()
{
return $this->then(function ($passable) {
return $passable;
});
}
/**
* Get the final piece of the Closure onion.
*
* @param \Closure $destination
* @return \Closure
*/
/var/www/vsepansionati.com/bff/base/Application.php
}
return $result;
}
/**
* Run middleware stack
* @param array $pipes
* @param mixed $passable
* @param Closure|null $destination
* @return mixed|\bff\http\Response
*/
public function middlewareRun(array $pipes, $passable, ?Closure $destination = null)
{
return (new Pipeline($this))
->send($passable)
->through($pipes)
->then($destination ?? function ($passable) {
return $passable;
});
}
/**
* @param string $method
* @param array $parameters
* @return mixed
*/
public function __call($method, $parameters)
{
# Call macro method
if (static::hasMacro($method)) {
return $this->callMacro($method, $parameters);
}
return null;
}
/**
* Handle dynamic static method calls into the method.
* @param string $method
/var/www/vsepansionati.com/bff/base/Application.php
'dynamic' => true,
]);
}
} catch (Throwable $e) {
$route = null;
}
# Handle route
if ($route) {
# Controller/action fallback
bff::$class = $route->getControllerName();
bff::$event = $route->getControllerMethod();
# Set request route
$request->setRouteResolver(function () use ($route) {
return $route;
});
}
# Call middleware stack
$response = $this->middlewareRun($this->finalizeMiddleware(
$this->filter('app.middleware', $this->middlewares),
$route
), $request);
# Fix http protocol mismatch
if ($response->getProtocolVersion() !== ($requestProtocol = $request->getProtocolVersion())) {
if ($requestProtocol === '2.0') {
$requestProtocol = '2';
}
$response = $response->withProtocolVersion($requestProtocol);
}
# Respond
if ($respond) {
$this->respond($response);
}
return $response;
}
/var/www/vsepansionati.com/public_html/index.php
<?php
require __DIR__ . '/../bff/bootstrap.php';
bff()->run();