Cuonic
a8f50e2f4b
Fixed problem with Request Json array
...
Fixed content type for browsers that also send character encoding, and
now send the JSON data through the Collection system.
11 years ago
Cuonic
33e79cbc7a
Fixed problem with Request Json array
...
Fixed application type for browsers that also send character encoding,
and now send the JSON data through the Collection system.
11 years ago
Mike Cao
f644c6fddd
Merge pull request #120 from nhutquang97/master
...
Change getVar() function from private to public
11 years ago
Quang Nhut Lam-Nguyen
bed3824192
Change getVar() function from private to public
...
This function is very useful to get extra headers like authorization (for JSON Web Token purpose),...
Flight::request()->getVar('custom');
11 years ago
Mike Cao
b10b294d83
Added method to get the application object instance.
11 years ago
Mike Cao
bd0c947455
Update VERSION
11 years ago
Mike Cao
ee55c1e722
Merge pull request #116 from Exquance/master
...
Add support for parsed JSON property in Request.
11 years ago
Berkus Decker
c0c7b9dcd9
Modify Request based on feedback from Mike.
11 years ago
Berkus
62c4f2fa0b
Add support for parsed JSON property in Request.
11 years ago
Mike Cao
0f6b6769d0
Updated composer.json file.
11 years ago
Mike Cao
b9b2d0fa2d
Added ability to register callbacks for class instantiation.
11 years ago
Mike Cao
33c5fb794a
Wrap text to be more legible.
11 years ago
Mike Cao
2776d54228
Added section about route object.
11 years ago
Mike Cao
3f710034e1
Merge pull request #92 from emanwebdev/patch-1
...
Fix JSONP example
11 years ago
Emmanuel еΜanwʬĔbdƎv
bf7a3d3475
Fix JSONP example
11 years ago
Mike Cao
6b6397764d
Use array in str_replace call.
11 years ago
Mike Cao
c44e5369ab
Bump version.
11 years ago
Mike Cao
6239ab4d80
Prevent collision of $template variable.
11 years ago
Mike Cao
24e069bafe
Merge pull request #89 from pborreli/typos
...
Fixed typos
11 years ago
Pascal Borreli
2648a5216e
Fixed typos
11 years ago
Mike Cao
092930f198
Bump version
11 years ago
Mike Cao
576a93efa1
Merge pull request #87 from woodent/patch-1
...
Simplify output buffering code
11 years ago
Micah Wood
3a4c0c72bf
Simplify output buffering code
...
No need to use both ob_get_contents() and ob_end_clean() when you can just use ob_get_clean().
11 years ago
Mike Cao
fdb88e842a
Fixed documentation.
11 years ago
Mike Cao
fbdd5a4338
Updated database example.
11 years ago
Mike Cao
7817255a61
Added ability to get splat from URL pattern.
11 years ago
Mike Cao
43287023d9
Bump version.
11 years ago
Mike Cao
14dca4addf
Added section about JSON. Added some missing info.
11 years ago
Mike Cao
b8e400e1be
Converted JSONP config into a parameter. Fixed incorrect content type.
11 years ago
Mike Cao
777ac096ec
JSON method should send a clean response.
11 years ago
Mike Cao
30195237e5
Reverted response handling.
...
Caused too many conflicts with other methods. Clean up should be done before the stop method is called.
11 years ago
Mike Cao
6a1029a187
Response should only be sent once.
11 years ago
Mike Cao
b8026d9828
Sending a response should not exit the program.
...
We need to allow events to fire after the stop method is called. This will allow users to clean up resources, perform logging, etc.
11 years ago
Mike Cao
5ba910981f
Allow HTTP method overriding.
11 years ago
Mike Cao
86d1ea20e4
Fixed reference to $this.
11 years ago
Mike Cao
001c8ec301
Fixed error with calling stop method.
11 years ago
Mike Cao
6fe4e32fee
Added additional options for JSON methods.
11 years ago
Mike Cao
6696c0d267
Dispatcher should check for valid callback.
11 years ago
Mike Cao
3fde3685c5
Formatting.
11 years ago
Mike Cao
6a7622d99b
Merge pull request #70 from eric1234/noenv
...
Use $_SERVER instead of getenv.
11 years ago
Eric Anderson
1a0eede079
Use $_SERVER instead of getenv.
...
This partially reverts cec890c
. In addition to other cleanup the commit changed
from using $_SERVER to getenv. As @kafene said on issue #21 , getenv provides a
nicer API making the code clean. I.E.
$val = getenv('val') ?: 'default';
Instead of:
$val = isset($_SERVER['val']) ? $_SERVER['val'] : 'default';
Although this is true unfortuantly it is less reliable. Using getenv in this
way assumes the application is running under some sort of CGI interface or
an interface that is simulating the CGI interface.
While this assumption is very often true it is not always true. For example
when using [PHP built-in webserver][1] (useful for development) getenv will
return false for most of these values even through $_SERVER is populated. I
believe also some interfaces on Windows don't populate getenv.
This means that flight is not usable in those environments. By partially
reverting cec890c
we re-enable flight in those environments.
For Engine.php and Response.php I just directly reverted cec890c
. Since request
makes so much use of getenv it seemed wise to abstract the conditional checking
to keep the code clean via a private function.
The tests were also updated to populate $_SERVER instead of the environment
via putenv.
[1]: http://php.net/manual/en/features.commandline.webserver.php
11 years ago
Mike Cao
5414b906f6
Merge pull request #62 from ozh/ozh-jsonp
...
JSONP support
11 years ago
ozh
258e56b4ec
Use $this
11 years ago
ozh
5e0627f41b
Coding style (same white space as original file)
11 years ago
ozh
4ccfe8c386
JSONP support
11 years ago
Mike Cao
7e1a098f6c
Autoloader should not throw exceptions.
12 years ago
Mike Cao
988d4f5631
Exception should be thrown and not handled.
12 years ago
Mike Cao
8ca9b2d76d
Setting status should not send headers.
12 years ago
Mike Cao
2d6a04d514
Made default properties into class variables.
12 years ago
Mike Cao
2ce369cb50
Flush existing output before the start method.
12 years ago