/home
/smbnordijc
/www
/htdocs
/content
/themes
/altimax
/resources
/views
/objets
/item_output
/default.twig
{% for objet in items %}
{% if objet[0] is iterable %}
{% for date, objets in objet %}
{% set currentDate = date %}
{#@todo : integration !!#}
{% for objet in objets %}
{{ objet|raw }}
{% endfor %}
{% endfor %}
{% else %}
{{ objet|raw }}
{% endif %}
{% endfor %}
/home
/smbnordijc
/www
/storage
/twig
/07
/07a5bbee401a052edcce3d3cbddcd53893fad2d2f739546c85dfc6dce7d0cde3.php
echo " ";
echo $context["objet"];
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['objet'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 11
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['date'], $context['objets'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 12
echo " ";
} else {
// line 13
echo " ";
echo $context["objet"];
echo "
";
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['objet'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
}
public function getTemplateName()
{
return "objets/item_output/default.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
/home
/smbnordijc
/www
/storage
/twig
/07
/07a5bbee401a052edcce3d3cbddcd53893fad2d2f739546c85dfc6dce7d0cde3.php
echo " ";
echo $context["objet"];
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['objet'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 11
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['date'], $context['objets'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 12
echo " ";
} else {
// line 13
echo " ";
echo $context["objet"];
echo "
";
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['objet'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
}
public function getTemplateName()
{
return "objets/item_output/default.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
/home
/smbnordijc
/www
/vendor
/twig
/twig
/lib
/Twig
/Template.php
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
} catch (Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
}
return ob_get_clean();
}
protected function displayWithErrorHandling(array $context, array $blocks = array())
{
try {
$this->doDisplay($context, $blocks);
} catch (Twig_Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($this->getSourceContext());
}
// this is mostly useful for Twig_Error_Loader exceptions
// see Twig_Error_Loader
if (false === $e->getTemplateLine()) {
$e->setTemplateLine(-1);
$e->guess();
}
throw $e;
} catch (Exception $e) {
throw new Twig_Error_Runtime(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
}
}
/**
* Auto-generated method to display the template with the given context.
/home
/smbnordijc
/www
/vendor
/twig
/twig
/lib
/Twig
/Template.php
}
/**
* Returns all blocks.
*
* This method is for internal use only and should never be called
* directly.
*
* @return array An array of blocks
*
* @internal
*/
public function getBlocks()
{
return $this->blocks;
}
public function display(array $context, array $blocks = array())
{
$this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
}
public function render(array $context)
{
$level = ob_get_level();
ob_start();
try {
$this->display($context);
} catch (Exception $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
} catch (Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
/home
/smbnordijc
/www
/storage
/twig
/71
/717393ce46954ec191b42836ec16989fe4b81d6b0d695b6502aa4e1c0795a52a.php
// line 38
echo " ";
$this->loadTemplate("objets/partials/faceting/dispokit.twig", "objets/default.twig", 38)->display($context);
// line 39
echo " ";
}
// line 40
echo " ";
$this->loadTemplate("objets/partials/faceting.twig", "objets/default.twig", 40)->display($context);
// line 41
echo "
<div class=\"ApidaeListing-items\">
";
// line 43
if ((twig_length_filter($this->env, $this->getAttribute(($context["results"] ?? null), "items", array())) > 0)) {
// line 44
echo " <div id=\"js-apidae-items-container\" class=\"ApidaeListingSimpleGrid\">
";
// line 45
$this->loadTemplate((($context["itemsPath"] ?? null) . ".twig"), "objets/default.twig", 45)->display(array_merge($context, array("items" => $this->getAttribute(($context["results"] ?? null), "items", array()))));
// line 46
echo " </div>
";
} else {
// line 48
echo " <h3>";
echo twig_escape_filter($this->env, call_user_func_array($this->env->getFunction('__')->getCallable(), array("Pas de résultat", "altimax")), "html", null, true);
echo "</h3>
";
}
// line 50
echo " ";
if ($this->getAttribute(($context["results"] ?? null), "itemsMore", array())) {
// line 51
echo " <div id=\"js-apidae-items-more-container\" class=\"hide\">
";
// line 52
$this->loadTemplate((($context["itemsPath"] ?? null) . ".twig"), "objets/default.twig", 52)->display(array_merge($context, array("items" => $this->getAttribute(($context["results"] ?? null), "itemsMore", array()))));
// line 53
echo " </div>
/home
/smbnordijc
/www
/vendor
/twig
/twig
/lib
/Twig
/Template.php
if ($useBlocks && isset($blocks[$name])) {
$template = $blocks[$name][0];
$block = $blocks[$name][1];
} elseif (isset($this->blocks[$name])) {
$template = $this->blocks[$name][0];
$block = $this->blocks[$name][1];
} else {
$template = null;
$block = null;
}
// avoid RCEs when sandbox is enabled
if (null !== $template && !$template instanceof self) {
throw new LogicException('A block must be a method on a Twig_Template instance.');
}
if (null !== $template) {
try {
$template->$block($context, $blocks);
} catch (Twig_Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($template->getSourceContext());
}
// this is mostly useful for Twig_Error_Loader exceptions
// see Twig_Error_Loader
if (false === $e->getTemplateLine()) {
$e->setTemplateLine(-1);
$e->guess();
}
throw $e;
} catch (Exception $e) {
throw new Twig_Error_Runtime(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $template->getSourceContext(), $e);
}
} elseif (false !== $parent = $this->getParent($context)) {
$parent->displayBlock($name, $context, array_merge($this->blocks, $blocks), false);
} else {
@trigger_error(sprintf('Silent display of undefined block "%s" in template "%s" is deprecated since version 1.29 and will throw an exception in 2.0. Use the "block(\'%s\') is defined" expression to test for block existence.', $name, $this->getTemplateName(), $name), E_USER_DEPRECATED);
/home
/smbnordijc
/www
/storage
/twig
/71
/717393ce46954ec191b42836ec16989fe4b81d6b0d695b6502aa4e1c0795a52a.php
'main' => array($this, 'block_main'),
);
}
protected function doDisplay(array $context, array $blocks = array())
{
// line 2
echo "
";
// line 4
echo " ";
// line 5
echo " ";
// line 6
echo " ";
// line 8
echo "<div class=\"containerFull containerApidaeListing\">
";
// line 9
$this->displayBlock('main', $context, $blocks);
// line 67
echo "</div>
";
}
// line 9
public function block_main($context, array $blocks = array())
{
// line 10
echo " <div ng-app=\"apidaeList\" ng-controller=\"ApidaeListCtrl as vm\">
<div class=\"ApidaeListing-intro container\">
</div>
<div class=\"ApidaeListing-control\">
<button class=\"Button-primary ApidaeListing-ButtonFilter\">
<svg role=\"presentation\" width=\"20\" height=\"25\">
<title>";
// line 18
echo twig_escape_filter($this->env, call_user_func_array($this->env->getFunction('__')->getCallable(), array("Mode carte", "altimax")), "html", null, true);
/home
/smbnordijc
/www
/vendor
/twig
/twig
/lib
/Twig
/Template.php
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
} catch (Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
}
return ob_get_clean();
}
protected function displayWithErrorHandling(array $context, array $blocks = array())
{
try {
$this->doDisplay($context, $blocks);
} catch (Twig_Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($this->getSourceContext());
}
// this is mostly useful for Twig_Error_Loader exceptions
// see Twig_Error_Loader
if (false === $e->getTemplateLine()) {
$e->setTemplateLine(-1);
$e->guess();
}
throw $e;
} catch (Exception $e) {
throw new Twig_Error_Runtime(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
}
}
/**
* Auto-generated method to display the template with the given context.
/home
/smbnordijc
/www
/vendor
/twig
/twig
/lib
/Twig
/Template.php
}
/**
* Returns all blocks.
*
* This method is for internal use only and should never be called
* directly.
*
* @return array An array of blocks
*
* @internal
*/
public function getBlocks()
{
return $this->blocks;
}
public function display(array $context, array $blocks = array())
{
$this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
}
public function render(array $context)
{
$level = ob_get_level();
ob_start();
try {
$this->display($context);
} catch (Exception $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
} catch (Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
/home
/smbnordijc
/www
/vendor
/twig
/twig
/lib
/Twig
/Template.php
* @return array An array of blocks
*
* @internal
*/
public function getBlocks()
{
return $this->blocks;
}
public function display(array $context, array $blocks = array())
{
$this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
}
public function render(array $context)
{
$level = ob_get_level();
ob_start();
try {
$this->display($context);
} catch (Exception $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
} catch (Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
}
return ob_get_clean();
}
protected function displayWithErrorHandling(array $context, array $blocks = array())
{
try {
/home
/smbnordijc
/www
/vendor
/twig
/twig
/lib
/Twig
/Environment.php
@trigger_error(sprintf('The %s method is deprecated since version 1.22 and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED);
return $this->templateClassPrefix;
}
/**
* Renders a template.
*
* @param string $name The template name
* @param array $context An array of parameters to pass to the template
*
* @return string The rendered template
*
* @throws Twig_Error_Loader When the template cannot be found
* @throws Twig_Error_Syntax When an error occurred during compilation
* @throws Twig_Error_Runtime When an error occurred during rendering
*/
public function render($name, array $context = array())
{
return $this->loadTemplate($name)->render($context);
}
/**
* Displays a template.
*
* @param string $name The template name
* @param array $context An array of parameters to pass to the template
*
* @throws Twig_Error_Loader When the template cannot be found
* @throws Twig_Error_Syntax When an error occurred during compilation
* @throws Twig_Error_Runtime When an error occurred during rendering
*/
public function display($name, array $context = array())
{
$this->loadTemplate($name)->display($context);
}
/**
* Loads a template.
*
/home
/smbnordijc
/www
/htdocs
/content
/mu-plugins
/themosis-framework
/src
/Themosis
/View
/Engines
/TwigEngine.php
}
/**
* Return the evaluated template.
*
* @param string $path The file name with its file extension.
* @param array $data Template data (view data)
*
* @return string
*/
public function get($path, array $data = [])
{
$file = array_search($path, $this->finder->getViews());
/*
* Allow the use of a '.' notation.
*/
$file = themosis_convert_path($file);
return $this->environment->render($file.$this->extension, $data);
}
}
/home
/smbnordijc
/www
/vendor
/illuminate
/view
/View.php
$this->factory->callComposer($this);
$contents = $this->getContents();
// Once we've finished rendering the view, we'll decrement the render count
// so that each sections get flushed out next time a view is created and
// no old sections are staying around in the memory of an environment.
$this->factory->decrementRender();
return $contents;
}
/**
* Get the evaluated contents of the view.
*
* @return string
*/
protected function getContents()
{
return $this->engine->get($this->path, $this->gatherData());
}
/**
* Get the data bound to the view instance.
*
* @return array
*/
protected function gatherData()
{
$data = array_merge($this->factory->getShared(), $this->data);
foreach ($data as $key => $value) {
if ($value instanceof Renderable) {
$data[$key] = $value->render();
}
}
return $data;
}
/home
/smbnordijc
/www
/vendor
/illuminate
/view
/View.php
throw $e;
}
}
/**
* Get the contents of the view instance.
*
* @return string
*/
protected function renderContents()
{
// We will keep track of the amount of views being rendered so we can flush
// the section after the complete rendering operation is done. This will
// clear out the sections for any separate views that may be rendered.
$this->factory->incrementRender();
$this->factory->callComposer($this);
$contents = $this->getContents();
// Once we've finished rendering the view, we'll decrement the render count
// so that each sections get flushed out next time a view is created and
// no old sections are staying around in the memory of an environment.
$this->factory->decrementRender();
return $contents;
}
/**
* Get the evaluated contents of the view.
*
* @return string
*/
protected function getContents()
{
return $this->engine->get($this->path, $this->gatherData());
}
/**
/home
/smbnordijc
/www
/vendor
/illuminate
/view
/View.php
$this->view = $view;
$this->path = $path;
$this->engine = $engine;
$this->factory = $factory;
$this->data = $data instanceof Arrayable ? $data->toArray() : (array) $data;
}
/**
* Get the string contents of the view.
*
* @param callable|null $callback
* @return string
*
* @throws \Throwable
*/
public function render(callable $callback = null)
{
try {
$contents = $this->renderContents();
$response = isset($callback) ? call_user_func($callback, $this, $contents) : null;
// Once we have the contents of the view, we will flush the sections if we are
// done rendering all views so that there is nothing left hanging over when
// another view gets rendered in the future by the application developer.
$this->factory->flushStateIfDoneRendering();
return ! is_null($response) ? $response : $contents;
} catch (Exception $e) {
$this->factory->flushState();
throw $e;
} catch (Throwable $e) {
$this->factory->flushState();
throw $e;
}
}
/home
/smbnordijc
/www
/htdocs
/content
/mu-plugins
/altimax-sitra
/resources
/models
/Display.php
//Passing data to the view...
//@altimax integration : you can add your custom data to the view like this : $renderParams['myData'] = $test;
$flexibleContentRender .= View::make(
'widgets.experiential-search.default',
$renderParams
)->render();
break;
case 'apidae_list_object' :
$model = new Objets($subFieldParams[$key]);
$renderParams = $model->getObjectListRenderData($post);
$scriptsLocalize[] = $model->getObjetsScriptLocalize();
//Passing data to the view...
//@altimax integration : you can add your custom data to the view like this : $renderParams['myData'] = $test;
$flexibleContentRender .= View::make(
'objets.' . $subFieldParams[$key]['apidae_list_default_template'],
$renderParams
)->render();
$isListing = true;
break;
case 'apidae_push_selection' :
$model = new PushSelections();
$renderParams = $model->getPushSelectionRenderData($subFieldParams[$key]);
$scriptsLocalize[] = $model->getObjetsScriptLocalize();
$template = $subFieldParams[$key]['apidae_push_selection_template'];
$flexibleContentRender .= View::make(
'widgets.push-selections.' . $template,
$renderParams
)->render();
break;
case 'apidae_push_event' :
$model = new PushEvents();
$renderParams = $model->setPushEventsRenderParams($subFieldParams[$key]);
/home
/smbnordijc
/www
/htdocs
/content
/themes
/altimax
/resources
/controllers
/PageController.php
//initialize html rendering
$flexibleContentRender = "";
$isListing = false;
$objetsScript = null;
$objetsScriptLocalize = array();
if (have_rows('content_builder')):
while (have_rows('content_builder')) : the_row();
switch (get_row_layout()) {
case 'apidae_content' :
case 'apidae' :
$subFieldParams = get_sub_field('apidae_content');
$apidaeProcessModel = new Display();
$apidaeData = $apidaeProcessModel->init($subFieldParams, $post);
if (!$objetsScript) {
$objetsScript = Asset::add('objets', 'js/apidae.min.js', [], null);
}
if ($objetsScript) {
$objetsScriptLocalize[] = $apidaeData['scriptsLocalize'];
}
$isListing = $apidaeData['isListing'];
$flexibleContentRender .= $apidaeData['render'];
break;
case 'contenu_textuel' :
$flexibleContentRender .= View::make('flex.flexContentText', [
'content' => get_sub_field('content')
])->render();
break;
case 'bouton' :
$flexibleContentRender .= View::make('flex.flexBouton', [
/home
/smbnordijc
/www
/htdocs
/content
/themes
/altimax
/resources
/routes.php
'listing_actus', function ($post) {
$pageController = new PageController(new Canonical(), 'page.listingActus');
$view = $pageController->index($post);
$args = array(
'posts_per_page' => -1,
'category_name' => 'actus',
'post_type' => 'post',
'post_status' => 'publish'
);
$actus = new WP_Query($args);
wp_reset_postdata();
$view->with('actus', $actus->posts);
return $view;
}
]);
/*page simple*/
Route::match(['GET', 'POST'], 'page', function ($post, $query) {
$pageController = new PageController(new Canonical(), 'page.page');
return $pageController->index($post);
});
/*page article*/
Route::get('single', function ($post) {
$pageController = new PageController(new Canonical(), 'page.single');
return $pageController->index($post);
});
/*page 404*/
Route::get('404', function ($post = null) {
return view('page.404', ['post' => $post]);
});
/home
/smbnordijc
/www
/vendor
/illuminate
/routing
/Route.php
* Checks whether the route's action is a controller.
*
* @return bool
*/
protected function isControllerAction()
{
return is_string($this->action['uses']);
}
/**
* Run the route action and return the response.
*
* @return mixed
*/
protected function runCallable()
{
$callable = $this->action['uses'];
return $callable(...array_values($this->resolveMethodDependencies(
$this->parametersWithoutNulls(), new ReflectionFunction($this->action['uses'])
)));
}
/**
* Run the route action and return the response.
*
* @return mixed
*
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
*/
protected function runController()
{
return $this->controllerDispatcher()->dispatch(
$this, $this->getController(), $this->getControllerMethod()
);
}
/**
* Get the controller instance for the route.
*
/home
/smbnordijc
/www
/vendor
/illuminate
/routing
/Route.php
protected function parseAction($action)
{
return RouteAction::parse($this->uri, $action);
}
/**
* Run the route action and return the response.
*
* @return mixed
*/
public function run()
{
$this->container = $this->container ?: new Container;
try {
if ($this->isControllerAction()) {
return $this->runController();
}
return $this->runCallable();
} catch (HttpResponseException $e) {
return $e->getResponse();
}
}
/**
* Checks whether the route's action is a controller.
*
* @return bool
*/
protected function isControllerAction()
{
return is_string($this->action['uses']);
}
/**
* Run the route action and return the response.
*
* @return mixed
*/
/home
/smbnordijc
/www
/vendor
/illuminate
/routing
/Router.php
/**
* Run the given route within a Stack "onion" instance.
*
* @param \Illuminate\Routing\Route $route
* @param \Illuminate\Http\Request $request
* @return mixed
*/
protected function runRouteWithinStack(Route $route, Request $request)
{
$shouldSkipMiddleware = $this->container->bound('middleware.disable') &&
$this->container->make('middleware.disable') === true;
$middleware = $shouldSkipMiddleware ? [] : $this->gatherRouteMiddleware($route);
return (new Pipeline($this->container))
->send($request)
->through($middleware)
->then(function ($request) use ($route) {
return $this->prepareResponse(
$request, $route->run()
);
});
}
/**
* Gather the middleware for the given route with resolved class names.
*
* @param \Illuminate\Routing\Route $route
* @return array
*/
public function gatherRouteMiddleware(Route $route)
{
$middleware = collect($route->gatherMiddleware())->map(function ($name) {
return (array) MiddlewareNameResolver::resolve($name, $this->middleware, $this->middlewareGroups);
})->flatten();
return $this->sortMiddleware($middleware);
}
/**
/home
/smbnordijc
/www
/vendor
/illuminate
/routing
/Pipeline.php
use Symfony\Component\Debug\Exception\FatalThrowableError;
/**
* This extended pipeline catches any exceptions that occur during each slice.
*
* The exceptions are converted to HTTP responses for proper middleware handling.
*/
class Pipeline extends BasePipeline
{
/**
* Get the final piece of the Closure onion.
*
* @param \Closure $destination
* @return \Closure
*/
protected function prepareDestination(Closure $destination)
{
return function ($passable) use ($destination) {
try {
return $destination($passable);
} catch (Exception $e) {
return $this->handleException($passable, $e);
} catch (Throwable $e) {
return $this->handleException($passable, new FatalThrowableError($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 {
$slice = parent::carry();
/home
/smbnordijc
/www
/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);
}
/**
* Get the final piece of the Closure onion.
*
* @param \Closure $destination
* @return \Closure
*/
protected function prepareDestination(Closure $destination)
{
return function ($passable) use ($destination) {
return $destination($passable);
};
}
/**
* Get a Closure that represents a slice of the application onion.
*
* @return \Closure
*/
/home
/smbnordijc
/www
/vendor
/illuminate
/routing
/Router.php
*
* @param \Illuminate\Routing\Route $route
* @param \Illuminate\Http\Request $request
* @return mixed
*/
protected function runRouteWithinStack(Route $route, Request $request)
{
$shouldSkipMiddleware = $this->container->bound('middleware.disable') &&
$this->container->make('middleware.disable') === true;
$middleware = $shouldSkipMiddleware ? [] : $this->gatherRouteMiddleware($route);
return (new Pipeline($this->container))
->send($request)
->through($middleware)
->then(function ($request) use ($route) {
return $this->prepareResponse(
$request, $route->run()
);
});
}
/**
* Gather the middleware for the given route with resolved class names.
*
* @param \Illuminate\Routing\Route $route
* @return array
*/
public function gatherRouteMiddleware(Route $route)
{
$middleware = collect($route->gatherMiddleware())->map(function ($name) {
return (array) MiddlewareNameResolver::resolve($name, $this->middleware, $this->middlewareGroups);
})->flatten();
return $this->sortMiddleware($middleware);
}
/**
* Sort the given middleware by priority.
*
/home
/smbnordijc
/www
/vendor
/illuminate
/routing
/Router.php
return $route;
}
/**
* Return the response for the given route.
*
* @param Route $route
* @param Request $request
* @return mixed
*/
protected function runRoute(Request $request, Route $route)
{
$request->setRouteResolver(function () use ($route) {
return $route;
});
$this->events->dispatch(new Events\RouteMatched($route, $request));
return $this->prepareResponse($request,
$this->runRouteWithinStack($route, $request)
);
}
/**
* Run the given route within a Stack "onion" instance.
*
* @param \Illuminate\Routing\Route $route
* @param \Illuminate\Http\Request $request
* @return mixed
*/
protected function runRouteWithinStack(Route $route, Request $request)
{
$shouldSkipMiddleware = $this->container->bound('middleware.disable') &&
$this->container->make('middleware.disable') === true;
$middleware = $shouldSkipMiddleware ? [] : $this->gatherRouteMiddleware($route);
return (new Pipeline($this->container))
->send($request)
->through($middleware)
/home
/smbnordijc
/www
/vendor
/illuminate
/routing
/Router.php
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse
*/
public function dispatch(Request $request)
{
$this->currentRequest = $request;
return $this->dispatchToRoute($request);
}
/**
* Dispatch the request to a route and return the response.
*
* @param \Illuminate\Http\Request $request
* @return mixed
*/
public function dispatchToRoute(Request $request)
{
return $this->runRoute($request, $this->findRoute($request));
}
/**
* Find the route matching a given request.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Routing\Route
*/
protected function findRoute($request)
{
$this->current = $route = $this->routes->match($request);
$this->container->instance(Route::class, $route);
return $route;
}
/**
* Return the response for the given route.
*
/home
/smbnordijc
/www
/vendor
/illuminate
/routing
/Router.php
* @return mixed
*/
public function respondWithRoute($name)
{
$route = tap($this->routes->getByName($name))->bind($this->currentRequest);
return $this->runRoute($this->currentRequest, $route);
}
/**
* Dispatch the request to the application.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse
*/
public function dispatch(Request $request)
{
$this->currentRequest = $request;
return $this->dispatchToRoute($request);
}
/**
* Dispatch the request to a route and return the response.
*
* @param \Illuminate\Http\Request $request
* @return mixed
*/
public function dispatchToRoute(Request $request)
{
return $this->runRoute($request, $this->findRoute($request));
}
/**
* Find the route matching a given request.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Routing\Route
*/
protected function findRoute($request)
/home
/smbnordijc
/www
/htdocs
/content
/mu-plugins
/themosis-framework
/themosis.php
* Register framework assets.
*/
$this->container['asset']->add('themosis-core-styles', 'css/_themosisCore.css', ['wp-color-picker'])->to('admin');
$this->container['asset']->add('themosis-core-scripts', 'js/_themosisCore.js', ['jquery', 'jquery-ui-sortable', 'underscore', 'backbone', 'mce-view', 'wp-color-picker'], '1.3.0', true)->to('admin');
}
/**
* Hook into front-end routing.
* Setup the router API to be executed before
* theme default templates.
*/
public function setRouter()
{
if (is_feed() || is_comment_feed()) {
return;
}
try {
$request = $this->container['request'];
$response = $this->container['router']->dispatch($request);
// We only send back the content because, headers are already defined
// by WordPress internals.
$response->sendContent();
} catch (\Symfony\Component\HttpKernel\Exception\NotFoundHttpException $exception) {
/*
* Fallback to WordPress templates.
*/
}
}
/**
* Enqueue Admin scripts.
*/
public function adminEnqueueScripts()
{
/*
* Make sure the media scripts are always enqueued.
*/
wp_enqueue_media();
/home
/smbnordijc
/www
/htdocs
/cms
/wp-includes
/class-wp-hook.php
}
$nesting_level = $this->nesting_level++;
$this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
$num_args = count( $args );
do {
$this->current_priority[ $nesting_level ] = $priority = current( $this->iterations[ $nesting_level ] );
foreach ( $this->callbacks[ $priority ] as $the_ ) {
if( ! $this->doing_action ) {
$args[ 0 ] = $value;
}
// Avoid the array_slice if possible.
if ( $the_['accepted_args'] == 0 ) {
$value = call_user_func_array( $the_['function'], array() );
} elseif ( $the_['accepted_args'] >= $num_args ) {
$value = call_user_func_array( $the_['function'], $args );
} else {
$value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int)$the_['accepted_args'] ) );
}
}
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
unset( $this->iterations[ $nesting_level ] );
unset( $this->current_priority[ $nesting_level ] );
$this->nesting_level--;
return $value;
}
/**
* Executes the callback functions hooked on a specific action hook.
*
* @since 4.7.0
*
* @param mixed $args Arguments to pass to the hook callbacks.
/home
/smbnordijc
/www
/htdocs
/cms
/wp-includes
/class-wp-hook.php
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
unset( $this->iterations[ $nesting_level ] );
unset( $this->current_priority[ $nesting_level ] );
$this->nesting_level--;
return $value;
}
/**
* Executes the callback functions hooked on a specific action hook.
*
* @since 4.7.0
*
* @param mixed $args Arguments to pass to the hook callbacks.
*/
public function do_action( $args ) {
$this->doing_action = true;
$this->apply_filters( '', $args );
// If there are recursive calls to the current action, we haven't finished it until we get to the last one.
if ( ! $this->nesting_level ) {
$this->doing_action = false;
}
}
/**
* Processes the functions hooked into the 'all' hook.
*
* @since 4.7.0
*
* @param array $args Arguments to pass to the hook callbacks. Passed by reference.
*/
public function do_all_hook( &$args ) {
$nesting_level = $this->nesting_level++;
$this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
do {
$priority = current( $this->iterations[ $nesting_level ] );
/home
/smbnordijc
/www
/htdocs
/cms
/wp-includes
/plugin.php
}
if ( !isset($wp_filter[$tag]) ) {
if ( isset($wp_filter['all']) )
array_pop($wp_current_filter);
return;
}
if ( !isset($wp_filter['all']) )
$wp_current_filter[] = $tag;
$args = array();
if ( is_array($arg) && 1 == count($arg) && isset($arg[0]) && is_object($arg[0]) ) // array(&$this)
$args[] =& $arg[0];
else
$args[] = $arg;
for ( $a = 2, $num = func_num_args(); $a < $num; $a++ )
$args[] = func_get_arg($a);
$wp_filter[ $tag ]->do_action( $args );
array_pop($wp_current_filter);
}
/**
* Retrieve the number of times an action is fired.
*
* @since 2.1.0
*
* @global array $wp_actions Increments the amount of times action was triggered.
*
* @param string $tag The name of the action hook.
* @return int The number of times action hook $tag is fired.
*/
function did_action($tag) {
global $wp_actions;
if ( ! isset( $wp_actions[ $tag ] ) )
return 0;
/home
/smbnordijc
/www
/htdocs
/cms
/wp-includes
/template-loader.php
<?php
/**
* Loads the correct template based on the visitor's url
* @package WordPress
*/
if ( defined('WP_USE_THEMES') && WP_USE_THEMES )
/**
* Fires before determining which template to load.
*
* @since 1.5.0
*/
do_action( 'template_redirect' );
/**
* Filters whether to allow 'HEAD' requests to generate content.
*
* Provides a significant performance bump by exiting before the page
* content loads for 'HEAD' requests. See #14348.
*
* @since 3.5.0
*
* @param bool $exit Whether to exit without generating any content for 'HEAD' requests. Default true.
*/
if ( 'HEAD' === $_SERVER['REQUEST_METHOD'] && apply_filters( 'exit_on_http_head', true ) )
exit();
// Process feeds and trackbacks even if not using themes.
if ( is_robots() ) :
/**
* Fired when the template loader determines a robots.txt request.
*
* @since 2.1.0
*/
do_action( 'do_robots' );
return;
elseif ( is_feed() ) :
do_feed();
return;
elseif ( is_trackback() ) :
include( ABSPATH . 'wp-trackback.php' );
/home
/smbnordijc
/www
/htdocs
/cms
/wp-blog-header.php
<?php
/**
* Loads the WordPress environment and template.
*
* @package WordPress
*/
if ( !isset($wp_did_header) ) {
$wp_did_header = true;
// Load the WordPress library.
require_once( dirname(__FILE__) . '/wp-load.php' );
// Set up the WordPress query.
wp();
// Load the theme template.
require_once( ABSPATH . WPINC . '/template-loader.php' );
}
/home
/smbnordijc
/www
/htdocs
/index.php
<?php
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define('WP_USE_THEMES', true);
/** Loads the WordPress Environment and Template */
require dirname(__FILE__).'/cms/wp-blog-header.php';