Subversion Repositories eFlore/Applications.cel

Rev

Rev 2463 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2463 Rev 3473
Line 38... Line 38...
38
	/**
38
	/**
39
	 * Constructor. Parses the configuration file "JRest.ini", grabs any request data sent, records the HTTP
39
	 * Constructor. Parses the configuration file "JRest.ini", grabs any request data sent, records the HTTP
40
	 * request method used and parses the request URL to find out the requested resource
40
	 * request method used and parses the request URL to find out the requested resource
41
	 * @param str iniFile Configuration file to use
41
	 * @param str iniFile Configuration file to use
42
	 */
42
	 */
43
	public function JRest($iniFile = 'jrest.ini.php') {
43
	public function __construct($iniFile = 'jrest.ini.php') {
44
		$this->config = parse_ini_file($iniFile, TRUE);
44
		$this->config = parse_ini_file($iniFile, TRUE);
45
		if (isset($_SERVER['REQUEST_URI']) && isset($_SERVER['REQUEST_METHOD']) && isset($_SERVER['QUERY_STRING'])) {
45
		if (isset($_SERVER['REQUEST_URI']) && isset($_SERVER['REQUEST_METHOD']) && isset($_SERVER['QUERY_STRING'])) {
46
			if (isset($_SERVER['CONTENT_LENGTH']) && $_SERVER['CONTENT_LENGTH'] > 0) {
46
			if (isset($_SERVER['CONTENT_LENGTH']) && $_SERVER['CONTENT_LENGTH'] > 0) {
47
				$this->requestData = '';
47
				$this->requestData = '';
48
				$httpContent = fopen('php://input', 'r');
48
				$httpContent = fopen('php://input', 'r');