/opt/httpd/tcl/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/RedirectResponse.php
* @see http://tools.ietf.org/html/rfc2616#section-10.3
*
* @api
*/
public function __construct($url, $status = 302, $headers = array())
{
if (empty($url)) {
throw new \InvalidArgumentException('Cannot redirect to an empty URL.');
}
/opt/httpd/tcl/app/base/lib/routing/redirector.php
* @param string $path
* @param int $status
* @param array $headers
* @return \Illuminate\Http\RedirectResponse
*/
protected function createRedirect($path, $status, $headers)
{
$redirect = new base_http_response_redirect($path, $status, $headers);
$redirect->setRequest($this->generator->getRequest());
/opt/httpd/tcl/app/base/lib/routing/redirector.php
* @param array $headers
* @return \Illuminate\Http\RedirectResponse
*/
public function back($status = 302, $headers = array())
{
$back = $this->generator->getRequest()->headers->get('referer');
return $this->createRedirect($back, $status, $headers);
}
/opt/httpd/tcl/app/base/lib/facades/facade.php
public static function __callStatic($method, $args)
{
$instance = static::getFacadeRoot();
switch (count($args))
{
case 0:
return $instance->$method();
case 1:
/opt/httpd/tcl/custom/topc/controller/list.php
//已选择的搜索条件
$pagedata['activeFilter'] = $params;
$initFilter = $this->__setInitFilter($params);
if( !$initFilter )
{
return redirect::back();
}
/opt/httpd/tcl/custom/topc/controller/list.php
//已选择的搜索条件
$pagedata['activeFilter'] = $params;
$initFilter = $this->__setInitFilter($params);
if( !$initFilter )
{
return redirect::back();
}
/opt/httpd/tcl/app/base/lib/routing/router.php
public function callController($instance, $method, $routeInfo)
{
$callable = [$instance, $method];
$parameters = $routeInfo[2];
try {
return $this->prepareResponse(
call_user_func_array($callable, $parameters)
);
} catch (HttpResponseException $e) {
/opt/httpd/tcl/app/base/lib/routing/router.php
$appId = substr($controller,0, strpos($controller, '_'));
if (! method_exists($instance = new $controller(app::get($appId)), $method)) {
throw new NotFoundHttpException;
}
return $this->callController($instance, $method, $routeInfo);
}
/opt/httpd/tcl/app/base/lib/routing/router.php
* @return mixed
*/
protected function callActionOnArrayBasedRoute($routeInfo)
{
$action = $routeInfo[1];
if (isset($action['uses'])) {
return $this->prepareResponse($this->callControllerAction($routeInfo));
}
/opt/httpd/tcl/app/base/lib/routing/router.php
$action = $routeInfo[1];
// Pipe through route middleware...
if (isset($action['middleware'])) {
$middleware = $this->gatherMiddlewareClassNames($action['middleware']);
return $this->prepareResponse($this->sendThroughPipeline($middleware, function () {
//todo:娌℃湁route
return $this->callActionOnArrayBasedRoute(request::route());
}));
}
/opt/httpd/tcl/app/base/lib/pipeline/pipeline.php
* @param \Closure $destination
* @return \Closure
*/
protected function getInitialSlice(Closure $destination)
{
return function($passable) use ($destination)
{
return call_user_func($destination, $passable);
};
}
/opt/httpd/tcl/app/base/ego/ego.php
/opt/httpd/tcl/app/base/lib/pipeline/pipeline.php
// the appropriate method and arguments, returning the results back out.
if ($pipe instanceof Closure)
{
return call_user_func($pipe, $passable, $stack);
}
else
{
return kernel::single($pipe)->{$this->method}($passable, $stack);
}
};
/opt/httpd/tcl/app/base/ego/ego.php
/opt/httpd/tcl/app/base/lib/pipeline/pipeline.php
// the appropriate method and arguments, returning the results back out.
if ($pipe instanceof Closure)
{
return call_user_func($pipe, $passable, $stack);
}
else
{
return kernel::single($pipe)->{$this->method}($passable, $stack);
}
};
/opt/httpd/tcl/app/theme/middleware/preview.php
public function handle($request, Closure $next)
{
if (isset($_COOKIE['site']['preview'])&&$_COOKIE['site']['preview']=='true')
{
theme::preview();
}
return $next($request);
}
}
/opt/httpd/tcl/app/base/lib/pipeline/pipeline.php
// the appropriate method and arguments, returning the results back out.
if ($pipe instanceof Closure)
{
return call_user_func($pipe, $passable, $stack);
}
else
{
return kernel::single($pipe)->{$this->method}($passable, $stack);
}
};
/opt/httpd/tcl/app/base/lib/pipeline/pipeline.php
{
$firstSlice = $this->getInitialSlice($destination);
$pipes = array_reverse($this->pipes);
return call_user_func(
array_reduce($pipes, $this->getSlice(), $firstSlice), $this->passable
);
}
/opt/httpd/tcl/app/base/lib/routing/router.php
//$this->make('middleware.disable') === true;
//if (count($middleware) > 0 && ! $shouldSkipMiddleware) {
if (count($middleware) > 0) {
return (new Pipeline($this))
->send(request::instance())
->through($middleware)
->then($then);
}
return $then();
/opt/httpd/tcl/app/base/lib/routing/router.php
// Pipe through route middleware...
if (isset($action['middleware'])) {
$middleware = $this->gatherMiddlewareClassNames($action['middleware']);
return $this->prepareResponse($this->sendThroughPipeline($middleware, function () {
//todo:娌℃湁route
return $this->callActionOnArrayBasedRoute(request::route());
}));
}
/opt/httpd/tcl/app/base/lib/routing/router.php
$cacheKey = md5(request::fullUrl());
$timeout = (int)$cacheStrategy['timeout'] !==0 ? $cacheStrategy['timeout'] : 1;
return unserialize(cache::store('controller-cache')->remember($cacheKey, $timeout, function() use ($routeInfo) {
return serialize($this->handleFoundRoute($routeInfo));
}));
}
}
return $this->handleFoundRoute($routeInfo);
}
/**
/opt/httpd/tcl/app/base/lib/routing/router.php
$pathInfo = empty($pathInfo) ? '/' : $pathInfo;
$cacheStrategys = config::get('page_cache.pages');
try {
return $this->sendThroughPipeline($this->middleware, function () use ($method, $pathInfo, $routes, $parameters) {
if (isset($routes[$method.$pathInfo])) {
return $this->handleFoundRouteCache([true, $routes[$method.$pathInfo]['action'], $parameters]);
}
/opt/httpd/tcl/app/base/lib/routing/router.php
//if (count($middleware) > 0 && ! $shouldSkipMiddleware) {
if (count($middleware) > 0) {
return (new Pipeline($this))
->send(request::instance())
->through($middleware)
->then($then);
}
return $then();
}
/opt/httpd/tcl/app/base/lib/routing/router.php
}
$routeInfo = $this->createDispatcher($routes)->dispatch($method, $pathInfo);
$routeInfo[2] = array_merge($parameters, (array)$routeInfo[2]);
return $this->handleDispatcherResponse($routeInfo);
});
} catch (Exception $e) {
return $this->sendExceptionToHandler($e);
/opt/httpd/tcl/app/base/lib/routing/router.php
throw new MethodNotAllowedHttpException($routeInfo[1]);
case Dispatcher::FOUND:
return $this->dispatchRoute($request, $routeInfo[1], (array)$routeInfo[2]);
}
}
} else {
//todo
return $this->dispatchRoute($request, $this->routes['nodomain']);
}
}
/opt/httpd/tcl/app/base/lib/routing/router.php
* Run the application and send the response.
*
* @param SymfonyRequest|null $request
* @return void
*/
public function run($request = null)
{
$response = $this->dispatch($request);
if ($response instanceof SymfonyResponse) {
/opt/httpd/tcl/app/base/lib/facades/facade.php
switch (count($args))
{
case 0:
return $instance->$method();
case 1:
return $instance->$method($args[0]);
case 2:
/opt/httpd/tcl/app/base/kernel.php
}
//static::registRouteMiddleware();
//$response = route::dispatch(request::instance());
//$response = static::sendRequestThroughRouter(request::instance());
route::run(request::instance());
// 临时处理方式
kernel::single('base_session')->close();
/opt/httpd/tcl/app/base/kernel.php
}
//static::registRouteMiddleware();
//$response = route::dispatch(request::instance());
//$response = static::sendRequestThroughRouter(request::instance());
route::run(request::instance());
// 临时处理方式
kernel::single('base_session')->close();
/opt/httpd/tcl/public/index.php
|
*/
require __DIR__.'/../bootstrap/autoload.php';
require __DIR__.'/../bootstrap/start.php';
kernel::boot();
// test