/home/c1461795/public_html/templates/blogInterna.twig
{% set social = { titulo: lang(post, "titulo"), des: lang(post, "bajada"), imagen: post.img } %}
{% extends "/base/base-front.twig" %}
{% block contenido %}
<main>
<article class="blogInterna" id="articulosec">
{% if post.visible %}
<h1>Blog</h1>
{% else %}
<h1>{{ post.titulo }}</h1>
/home/c1461795/public_html/app/src/Core/SecureSessionHandler.php
if ( !$this->isValid()) {
$this->forget();
}
}
private function setup()
{
ini_set('session.use_cookies', 1);
ini_set('session.use_only_cookies', 1);
/home/c1461795/public_html/app/src/Core/SecureSessionHandler.php
if ( !$this->isValid()) {
$this->forget();
}
}
private function setup()
{
ini_set('session.use_cookies', 1);
ini_set('session.use_only_cookies', 1);
/home/c1461795/public_html/app/src/Core/SecureSessionHandler.php
'lifetime' => 0,
'path' => ini_get('session.cookie_path'),
'domain' => ini_get('session.cookie_domain'),
'secure' => isset($_SERVER['HTTPS']),
'httponly' => true
];
$this->setup();
$this->start();
/home/c1461795/public_html/app/dependencies.php
// Flash messages
$container['flash'] = function ($c) {
return new \Slim\Flash\Messages;
};
//session front
$container['sessionFront'] = function($c){
return new SecureSessionHandler("front");
};
/home/c1461795/public_html/vendor/pimple/pimple/src/Pimple/Container.php
}
if (isset($this->factories[$this->values[$id]])) {
return $this->values[$id]($this);
}
$raw = $this->values[$id];
$val = $this->values[$id] = $raw($this);
$this->raw[$id] = $raw;
/home/c1461795/public_html/vendor/slim/slim/Slim/Container.php
*/
public function get($id)
{
if (!$this->offsetExists($id)) {
throw new ContainerValueNotFoundException(sprintf('Identifier "%s" is not defined.', $id));
}
try {
return $this->offsetGet($id);
} catch (InvalidArgumentException $exception) {
if ($this->exceptionThrownByContainer($exception)) {
/home/c1461795/public_html/vendor/slim/slim/Slim/Container.php
* @throws SlimContainerException Thrown when an exception is not
* an instance of ContainerExceptionInterface
* @throws ContainerValueNotFoundException No entry was found for this identifier.
* @throws ContainerExceptionInterface Error while retrieving the entry.
*/
public function __get($name)
{
return $this->get($name);
}
/home/c1461795/public_html/app/src/Core/TwigSettings.php
new \Twig_SimpleFilter('small_image', array($this, 'smallImage')),
new \Twig_SimpleFilter('preg_replace', array($this, 'pregReplace'))
];
}
public function lang($obj, $attr){
$lang = "";
if($this->container->sessionFront->get('lang') != "es"){
$lang = "_".$this->container->sessionFront->get('lang');
}
/home/c1461795/public_html/cache/twig/27/27877ff4fcc5e315d300946ed20bbde308db9b11a7f1d42c9310d9e78c0cd19d.php
// line 2
return "/base/base-front.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
// line 1
$context["social"] = ["titulo" => $this->env->getExtension('App\Core\TwigSettings')->lang(($context["post"] ?? null), "titulo"), "des" => $this->env->getExtension('App\Core\TwigSettings')->lang(($context["post"] ?? null), "bajada"), "imagen" => $this->getAttribute(($context["post"] ?? null), "img", [])];
// line 2
$this->parent = $this->loadTemplate("/base/base-front.twig", "blogInterna.twig", 2);
/home/c1461795/public_html/vendor/twig/twig/src/Template.php
return ob_get_clean();
}
protected function displayWithErrorHandling(array $context, array $blocks = [])
{
try {
$this->doDisplay($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
/home/c1461795/public_html/vendor/twig/twig/src/Template.php
public function getBlocks()
{
return $this->blocks;
}
public function display(array $context, array $blocks = [])
{
$this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
}
/home/c1461795/public_html/vendor/twig/twig/src/Template.php
$level = ob_get_level();
if ($this->env->isDebug()) {
ob_start();
} else {
ob_start(function () { return ''; });
}
try {
$this->display($context);
} catch (\Exception $e) {
while (ob_get_level() > $level) {
/home/c1461795/public_html/vendor/slim/twig-view/src/Twig.php
*
* @return string
*/
public function fetch($template, $data = [])
{
$data = array_merge($this->defaultVariables, $data);
return $this->environment->loadTemplate($template)->render($data);
}
/home/c1461795/public_html/vendor/slim/twig-view/src/Twig.php
* @param ResponseInterface $response
* @param string $template Template pathname relative to templates directory
* @param array $data Associative array of template variables
* @return ResponseInterface
*/
public function render(ResponseInterface $response, $template, $data = [])
{
$response->getBody()->write($this->fetch($template, $data));
return $response;
/home/c1461795/public_html/app/src/Core/TwigRenderer.php
public static function frontRender($that, ServerRequestInterface $request, ResponseInterface $response, $template, $variables){
$variables["currentUrl"] = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$variables["rootUrl"] = "http://$_SERVER[HTTP_HOST]";
$variables["currentPath"] = $request->getUri()->getPath();
$variables["commonpath"] = getenv("COMMON_PATH");
$variables["publicpath"] = getenv("PUBLIC_PATH");
$variables["uploadpath"] = getenv("UPLOAD_PATH");;
return $that->view->render($response, $template, $variables);
}
}
/home/c1461795/public_html/app/routes.php
'title' => $post->titulo,
'persons' => $persons,
'posts' => $posts,
'estudio' => $estudio,
'solutions' => $solutions,
'post' => $post,
];
return TwigRenderer::frontRender($this, $request, $response, 'blogInterna.twig', $vars);
});
/home/c1461795/public_html/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php
ResponseInterface $response,
array $routeArguments
) {
foreach ($routeArguments as $k => $v) {
$request = $request->withAttribute($k, $v);
}
return call_user_func($callable, $request, $response, $routeArguments);
}
}
/home/c1461795/public_html/vendor/slim/slim/Slim/Route.php
public function __invoke(ServerRequestInterface $request, ResponseInterface $response)
{
$this->callable = $this->resolveCallable($this->callable);
/** @var InvocationStrategyInterface $handler */
$handler = isset($this->container) ? $this->container->get('foundHandler') : new RequestResponse();
$newResponse = $handler($this->callable, $request, $response, $this->arguments);
if ($newResponse instanceof ResponseInterface) {
/home/c1461795/public_html/vendor/slim/slim/Slim/MiddlewareAwareTrait.php
{
if (is_null($this->tip)) {
$this->seedMiddlewareStack();
}
/** @var callable $start */
$start = $this->tip;
$this->middlewareLock = true;
$response = $start($request, $response);
$this->middlewareLock = false;
return $response;
/home/c1461795/public_html/vendor/slim/slim/Slim/Route.php
*/
public function run(ServerRequestInterface $request, ResponseInterface $response)
{
// Finalise route now that we are about to run it
$this->finalize();
// Traverse middleware stack and fetch updated response
return $this->callMiddlewareStack($request, $response);
}
/home/c1461795/public_html/vendor/slim/slim/Slim/App.php
if (null === $routeInfo || ($routeInfo['request'] !== [$request->getMethod(), (string) $request->getUri()])) {
$request = $this->dispatchRouterAndPrepareRoute($request, $router);
$routeInfo = $request->getAttribute('routeInfo');
}
if ($routeInfo[0] === Dispatcher::FOUND) {
$route = $router->lookupRoute($routeInfo[1]);
return $route->run($request, $response);
} elseif ($routeInfo[0] === Dispatcher::METHOD_NOT_ALLOWED) {
if (!$this->container->has('notAllowedHandler')) {
/home/c1461795/public_html/vendor/zeuxisoo/slim-whoops/src/Zeuxisoo/Whoops/Provider/Slim/WhoopsMiddleware.php
$container['errorHandler'] = function() use ($whoops) {
return new WhoopsErrorHandler($whoops);
};
$container['whoops'] = $whoops;
}
return $app($request, $response);
}
/home/c1461795/public_html/vendor/slim/slim/Slim/DeferredCallable.php
$callable = $this->resolveCallable($this->callable);
if ($callable instanceof Closure) {
$callable = $callable->bindTo($this->container);
}
$args = func_get_args();
return call_user_func_array($callable, $args);
}
}
/home/c1461795/public_html/vendor/slim/slim/Slim/MiddlewareAwareTrait.php
$this->tip = function (
ServerRequestInterface $request,
ResponseInterface $response
) use (
$callable,
$next
) {
$result = call_user_func($callable, $request, $response, $next);
if ($result instanceof ResponseInterface === false) {
throw new UnexpectedValueException(
/home/c1461795/public_html/app/middleware.php
if ($path != '/' && substr($path, -1) == '/') {
// permanently redirect paths with a trailing slash
// to their non-trailing counterpart
$uri = $uri->withPath(substr($path, 0, -1));
return $response->withRedirect((string)$uri, 301);
}
return $next($request, $response);
});
/home/c1461795/public_html/vendor/slim/slim/Slim/DeferredCallable.php
$callable = $this->resolveCallable($this->callable);
if ($callable instanceof Closure) {
$callable = $callable->bindTo($this->container);
}
$args = func_get_args();
return call_user_func_array($callable, $args);
}
}
/home/c1461795/public_html/vendor/slim/slim/Slim/MiddlewareAwareTrait.php
$this->tip = function (
ServerRequestInterface $request,
ResponseInterface $response
) use (
$callable,
$next
) {
$result = call_user_func($callable, $request, $response, $next);
if ($result instanceof ResponseInterface === false) {
throw new UnexpectedValueException(
/home/c1461795/public_html/vendor/slim/slim/Slim/MiddlewareAwareTrait.php
{
if (is_null($this->tip)) {
$this->seedMiddlewareStack();
}
/** @var callable $start */
$start = $this->tip;
$this->middlewareLock = true;
$response = $start($request, $response);
$this->middlewareLock = false;
return $response;
/home/c1461795/public_html/vendor/slim/slim/Slim/App.php
if ($this->container->get('settings')['determineRouteBeforeAppMiddleware'] === true) {
// Dispatch router (note: you won't be able to alter routes after this)
$request = $this->dispatchRouterAndPrepareRoute($request, $router);
}
// Traverse middleware stack
try {
$response = $this->callMiddlewareStack($request, $response);
} catch (Exception $e) {
$response = $this->handleException($e, $request, $response);
/home/c1461795/public_html/vendor/slim/slim/Slim/App.php
*/
public function run($silent = false)
{
$response = $this->container->get('response');
try {
ob_start();
$response = $this->process($this->container->get('request'), $response);
} catch (InvalidMethodException $e) {
$response = $this->processInvalidMethod($e->getRequest(), $response);
/home/c1461795/public_html/public/index.php
// Register middleware
require __DIR__ . '/../app/middleware.php';
// Register routes
require __DIR__ . '/../app/routes.php';
// Run app
$app->run();