File: rampage.php

package info (click to toggle)
php-horde 5.2.1%2Bdebian0-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 12,196 kB
  • sloc: php: 11,089; xml: 6,460; sh: 96; makefile: 33; sql: 1
file content (63 lines) | stat: -rw-r--r-- 1,973 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
/**
 * Rampage routing script
 *
 * Theory/notes:
 *
 *  - registry is already modular
 *  - can use webroot or a new slug param to match the beginning of URLs for routing
 *  - then pass to the app's route bundle
 *  - how to set right class names for apps (controllers, etc.)
 *  - registry could be (optionally) db-managed as a Horde_Policy
 *  - just array/hash structures
 *  - build a cached regex to match apps - or just slugs, but strip off horde webroot first
 *  - app directory structure - apps w/out images/css/etc. can be entirely out of the webroot. components! tagger is a good candidate for this
 *  - apps have their own default policies, but put overrides in global horde config dir?
 *  - special autoload for views + controllers
 *  - where to put public/ dirs?
 *
 * [app|component]/
 *   Views/
 *   Controllers/
 *     FooController.php -> class App_FooController
 * no nested components?

request processing steps:

- bootstrap
- injector bindings
* customization point
- create request
- create request mapper
- $config = $mapper->getRquestConfiguration($request)
- create runner
- execute runner
  - get settings exporter
  - export bindings
  - get controller name
  - create response
  - create controller builder
  - create filter runner
  - export filters
  - handle internal redirects
  - return response
- write response

add filtered requests/blue_filter port to Horde?
 *
 * @category Horde
 * @license  http://www.horde.org/licenses/lgpl LGPL-2
 * @package  Horde
 */

require_once __DIR__ . '/lib/Application.php';
Horde_Registry::appInit('horde');

$request = $injector->getInstance('Horde_Controller_Request');

$runner = $injector->getInstance('Horde_Controller_Runner');
$config = $injector->getInstance('Horde_Controller_RequestConfiguration');
$response = $runner->execute($injector, $request, $config);

$responseWriter = $injector->getInstance('Horde_Controller_ResponseWriter');
$responseWriter->writeResponse($response);