Welcome Guest, Not a member yet? Register   Sign In
Introducing...REST!
#31

[eluser]jeffpeck[/eluser]
For detect_method, I added:

/*
* Detect method
*
* Detect which method (POST, PUT, GET, DELETE) is being used
*/
private function _detect_method()
{
if ($this->input->server('HTTP_X_HTTP_METHOD_OVERRIDE'))
$method = strtolower($this->input->server('HTTP_X_HTTP_METHOD_OVERRIDE'));
else
$method = strtolower($this->input->server('REQUEST_METHOD'));

if(in_array($method, array('get', 'delete', 'post', 'put')))
{
return $method;
}

return 'get';
}


Messages In This Thread
Introducing...REST! - by El Forum - 03-02-2008, 01:30 PM
Introducing...REST! - by El Forum - 03-09-2008, 12:42 AM
Introducing...REST! - by El Forum - 03-09-2008, 09:29 AM
Introducing...REST! - by El Forum - 03-11-2008, 11:00 AM
Introducing...REST! - by El Forum - 04-04-2008, 08:42 AM
Introducing...REST! - by El Forum - 04-04-2008, 08:32 PM
Introducing...REST! - by El Forum - 04-05-2008, 04:26 AM
Introducing...REST! - by El Forum - 04-05-2008, 05:48 AM
Introducing...REST! - by El Forum - 04-05-2008, 06:38 AM
Introducing...REST! - by El Forum - 04-05-2008, 09:55 AM
Introducing...REST! - by El Forum - 04-05-2008, 10:12 PM
Introducing...REST! - by El Forum - 04-06-2008, 03:46 AM
Introducing...REST! - by El Forum - 04-06-2008, 09:48 AM
Introducing...REST! - by El Forum - 04-06-2008, 09:48 AM
Introducing...REST! - by El Forum - 06-14-2008, 06:54 PM
Introducing...REST! - by El Forum - 06-14-2008, 07:09 PM
Introducing...REST! - by El Forum - 06-16-2008, 12:55 PM
Introducing...REST! - by El Forum - 06-18-2008, 09:34 AM
Introducing...REST! - by El Forum - 06-20-2008, 11:32 AM
Introducing...REST! - by El Forum - 06-23-2008, 04:59 PM
Introducing...REST! - by El Forum - 07-01-2008, 06:57 PM
Introducing...REST! - by El Forum - 07-01-2008, 07:51 PM
Introducing...REST! - by El Forum - 07-04-2008, 02:49 PM
Introducing...REST! - by El Forum - 07-04-2008, 04:00 PM
Introducing...REST! - by El Forum - 08-01-2008, 08:57 PM
Introducing...REST! - by El Forum - 10-02-2008, 06:42 PM
Introducing...REST! - by El Forum - 10-15-2008, 10:05 PM
Introducing...REST! - by El Forum - 10-21-2008, 07:17 PM
Introducing...REST! - by El Forum - 11-03-2008, 10:23 PM
Introducing...REST! - by El Forum - 05-24-2009, 04:41 AM
Introducing...REST! - by El Forum - 09-10-2009, 11:24 AM
Introducing...REST! - by El Forum - 03-24-2010, 11:51 AM
Introducing...REST! - by El Forum - 03-24-2010, 01:57 PM
Introducing...REST! - by El Forum - 03-24-2010, 02:18 PM
Introducing...REST! - by El Forum - 05-31-2010, 09:36 AM



Theme © iAndrew 2016 - Forum software by © MyBB