*/
protected function handleQueryException(\Exception $e, $query, $bindings)
{
$bindings = var_export($bindings, true);
$message = $e->getMessage()." (SQL: {$query}) (Bindings: {$bindings})";
throw new \Exception($message, 0, $e);
}
}
// If an exception occurs when attempting to run a query, we'll format the error
// message to include the bindings with SQL, which will make this exception a
// lot more helpful to the developer instead of just the database's errors.
catch (\Exception $e)
{
$this->handleQueryException($e, $query, $bindings);
}
// of the database result set. Each element in the array will be a single
// row from the database table, and will either be an array or objects.
$statement = $me->getPdo()->prepare($query);
$statement->execute($me->prepareBindings($bindings));
return $statement->fetchAll($me->getFetchMode());
});
}
/**
* Run the query as a "select" statement against the connection.
*
* @return array
*/
protected function runSelect()
{
return $this->connection->select($this->toSql(), $this->bindings);
}
* @param array $columns
* @return array|static[]
*/
public function getFresh($columns = array('*'))
{
if (is_null($this->columns)) $this->columns = $columns;
return $this->processor->processSelect($this, $this->runSelect());
}
* @param array $columns
* @return array|static[]
*/
public function get($columns = array('*'))
{
if ( ! is_null($this->cacheMinutes)) return $this->getCached($columns);
return $this->getFresh($columns);
}
$funnel = FunnelService::getFunnel($funnel_id);
if (!$funnel) {
return [];
}
$categories = Tenant::DB()->table('funnel_settings_categories')
->where('funnel_id', $funnel_id)
->get();
return $categories;
<?php else: ?>
var g_page_id = '';
<?php endif; ?>
<?php if (!empty($funnel->id) && !empty($funnel_step->id)): ?>
var g_funnel_id = "<?php echo $funnel->id; ?>";
var g_funnel_step_id = "<?php echo $funnel_step->id; ?>";
var g_funnel_products = <?php echo json_encode(ProductService::get_products_data($funnel->id)); ?> || null;
var g_funnel_categories = <?php echo json_encode(ProductService::getCategoryData($funnel->id)); ?>;
var g_funnel_shipping_methods = <?php echo json_encode(ShippingMethodService::get_shipping_methods_data($funnel->id)); ?> || null;
var g_funnel_mode = '<?php echo $funnel->funnel_mode; ?>';
extract($__data);
// We'll evaluate the contents of the view inside a try/catch block so we can
// flush out any stray output that might get out before an error occurs or
// an exception is thrown. This prevents any partial views from leaking.
try
{
include $__path;
}
catch (\Exception $e)
if ($this->compiler->isExpired($path))
{
$this->compiler->compile($path);
}
$compiled = $this->compiler->getCompiledPath($path);
return $this->evaluatePath($compiled, $data);
}
/**
* Get the evaluated contents of the view.
*
* @return string
*/
protected function getContents()
{
return $this->engine->get($this->path, $this->gatherData());
}
// 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.
$env->incrementRender();
$env->callComposer($this);
$contents = $this->getContents();
// Once we've finished rendering the view, we'll decrement the render count
<body <?php echo urldecode($page_details['preview_body_attrs']); ?>>
<div id='dimmer'></div>
<?php echo urldecode($page_details['preview_body']); ?>
<?php echo $__env->make ('builder.visitor.badge', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php echo $__env->make ('builder.visitor.warning', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php echo $__env->make ('builder.visitor.visitor_notification', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php echo $__env->make ('builder.visitor.cookie_widget', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php echo $__env->make ('builder.visitor.visitor_script', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php echo $__env->make ('builder.visitor.visitor_script_files', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
extract($__data);
// We'll evaluate the contents of the view inside a try/catch block so we can
// flush out any stray output that might get out before an error occurs or
// an exception is thrown. This prevents any partial views from leaking.
try
{
include $__path;
}
catch (\Exception $e)
if ($this->compiler->isExpired($path))
{
$this->compiler->compile($path);
}
$compiled = $this->compiler->getCompiledPath($path);
return $this->evaluatePath($compiled, $data);
}
/**
* Get the evaluated contents of the view.
*
* @return string
*/
protected function getContents()
{
return $this->engine->get($this->path, $this->gatherData());
}
// 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.
$env->incrementRender();
$env->callComposer($this);
$contents = $this->getContents();
// Once we've finished rendering the view, we'll decrement the render count
}
// If this content implements the "RenderableInterface", then we will call the
// render method on the object so we will avoid any "__toString" exceptions
// that might be thrown and have their errors obscured by PHP's handling.
elseif ($content instanceof RenderableInterface)
{
$content = $content->render();
}
* @throws \InvalidArgumentException When the HTTP status code is not valid
*
* @api
*/
public function __construct($content = '', $status = 200, $headers = array())
{
$this->headers = new ResponseHeaderBag($headers);
$this->setContent($content);
$this->setStatusCode($status);
$this->setProtocolVersion('1.0');
*
* @param mixed $value
* @param \Illuminate\Http\Request $request
* @return \Symfony\Component\HttpFoundation\Response
*/
public function prepare($value, Request $request)
{
if ( ! $value instanceof SymfonyResponse) $value = new Response($value);
return $value->prepare($request);
protected function processResponse($router, $method, $response)
{
$request = $router->getRequest();
// The after filters give the developers one last chance to do any last minute
// processing on the response. The response has already been converted to a
// full Response object and will also be handed off to the after filters.
$response = $router->prepare($response, $request);
$this->callAfterFilters($router, $method, $response);
// used we will assume we want to just return the layout view as any nested
// views were probably bound on this view during this controller actions.
if (is_null($response) and ! is_null($this->layout))
{
$response = $this->layout;
}
return $this->processResponse($router, $method, $response);
}
// We will extract the passed in parameters off of the route object so we will
// pass them off to the controller method as arguments. We will not get the
// defaults so that the controllers will be able to use its own defaults.
$args = array_values($route->getParametersWithoutDefaults());
$instance = $ioc->make($controller);
return $instance->callAction($ioc, $me, $method, $args);
};
}
*
* @return mixed
*/
protected function callCallable()
{
$variables = array_values($this->getParametersWithoutDefaults());
return call_user_func_array($this->getOption('_call'), $variables);
}
// We will only call the router callable if no "before" middlewares returned
// a response. If they do, we will consider that the response to requests
// so that the request "lifecycle" will be easily halted for filtering.
$response = $this->callBeforeFilters($request);
if ( ! isset($response))
{
$response = $this->callCallable();
}
// Once we have the route, we can just run it to get the responses, which will
// always be instances of the Response class. Once we have the responses we
// will execute the global "after" middlewares to finish off the request.
else
{
$this->currentRoute = $route = $this->findRoute($request);
$response = $route->run($request);
}
if ($this->isDownForMaintenance())
{
$response = $this['events']->until('illuminate.app.down');
if ( ! is_null($response)) return $this->prepareResponse($response, $request);
}
return $this['router']->dispatch($this->prepareRequest($request));
}
/**
* Handles the given request and delivers the response.
*
* @return void
*/
public function run()
{
$response = $this->dispatch($this['request']);
$this['router']->callCloseFilter($this['request'], $response);
| and wonderful applications we have created for them.
|
*/
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$app->run();
/*