/
TODO
51 lines (38 loc) · 2.36 KB
/
TODO
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
# TODO #
- improve render_partial to work as partials in Rails
- improving unregister_globals
- to avoid predefined variables (_SERVER, _REQUEST...) deletion
- to handle session globals by calling unregister_globals('_SESSION') after session start
- more unit and functional tests
- in run(), passing $env to all functions that require it
- implements stop_and_exit() call with register_shutdown_function
- in call_if_exist(), using is_callable() instead of function_exists will allow calling objects methods <http://www.php.net/manual/en/function.is-callable.php>
- deleting deprecated $GLOBALS['HTTP_SERVER_VARS'], $GLOBALS['HTTP_GET_VARS']... (<http://www.php.net/manual/fr/reserved.variables.post.php>...)
- params function should be singular like option ?
- adding a debug() helper
- new redirect_to (support for https)
- add header X-Limonade-PHP: (lim version name); (cosmetic ;-)
- use array_walk_recursive for unregister_globals
- add a LIM_START_MEMORY with memory_get_usage()
- add a simple helper to benchmark (execution time / memory)
- adding gzip option (http://fr.php.net/manual/en/zlib.configuration.php#ini.zlib.output-compression)
- simple form helper with XSS/CSRF protection
- remove examples/ and move it in an external depot
- public API documentation:
- tests: tag private functions
- tests: describe in docblock header abstract definitions
- add links in header/welcome page(blank.tpl): project web site (clic on logo?), README, github
## Later ##
- add routing support for dispatching to class methods: `dispatch('/hello/:name', 'Hello::who');`
- add routing support for dispatching to lambdas/closures (requires PHP 5.3.0): `dispatch('/hello/:name', function(){ # ... });`.
> If you want to check whether you're dealing with a closure specifically and not a string or array callback you can do this:
<?php
$isAClosure = is_callable($thing) && is_object($thing);
?>
- http caching
- file caching
- x-sender headers for serving static files directly thru Apache and Lighttpd
## Think about it ##
- adding an options array to dispatch functions. Perhaps for supporting user agent detection, language detection or something like that ?
- make post, put and delete params accessible with the params() function
(take care of possible conflict with a route param: by default override get params, but raise an error notice). Really useful ?