Mercurial > hg > extraction-interface
comparison develop/classes/basemodel.php @ 43:807d3bb33da7 extractapp
config lg server url, without port
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Thu, 12 Mar 2015 17:58:09 +0100 |
parents | c245d54eab9f |
children | 3d6b8fb7335d |
comparison
equal
deleted
inserted
replaced
42:c245d54eab9f | 43:807d3bb33da7 |
---|---|
1 <?php | 1 <?php |
2 | 2 |
3 abstract class BaseModel { | 3 abstract class BaseModel { |
4 // protected $database; | 4 |
5 protected $systemNAME, $lgserver_url; | |
6 | |
7 protected $get_text_from_fileId_url = $this->lgserver_url."rest/text/getFileText?fileId="; | |
8 protected $get_text_from_sectionId_url = $this->lgserver_url."rest/text/getSectionText?sectionId="; | |
9 protected $save_to_LGService_url = $this->lgserver_url."rest/text/save"; | |
10 protected $save_new_to_LGService_url = $this->lgserver_url."rest/text/saveNew"; | |
11 | |
12 | |
13 /* | 5 /* |
14 protected $get_text_from_fileId_url = "http://localgazetteers-dev/LGServer/rest/text/getFileText?fileId="; | 6 protected $get_text_from_fileId_url = "http://localgazetteers-dev/LGServer/rest/text/getFileText?fileId="; |
15 protected $get_text_from_sectionId_url = "http://localgazetteers-dev/LGServer/rest/text/getSectionText?sectionId="; | 7 protected $get_text_from_sectionId_url = "http://localgazetteers-dev/LGServer/rest/text/getSectionText?sectionId="; |
16 protected $save_to_LGService_url = "http://localgazetteers-dev/LGServer/rest/text/save"; | 8 protected $save_to_LGService_url = "http://localgazetteers-dev/LGServer/rest/text/save"; |
17 protected $save_new_to_LGService_url = "http://localgazetteers-dev/LGServer/rest/text/saveNew"; | 9 protected $save_new_to_LGService_url = "http://localgazetteers-dev/LGServer/rest/text/saveNew"; |
10 | |
18 */ | 11 */ |
19 | |
20 | 12 |
21 public function __construct() { | 13 public function __construct() { |
22 global $mysql_database, $mysql_server, $mysql_user, $mysql_password, $systemNAME, $lgserver_url; | 14 global $mysql_database, $mysql_server, $mysql_user, $mysql_password, $systemNAME, $lgserver_url; |
23 $this->systemNAME = $systemNAME; | 15 $this->systemNAME = $systemNAME; |
24 $this->lgserver_url = $lgserver_url; | 16 |
17 $this->get_text_from_fileId_url = $lgserver_url."rest/text/getFileText?fileId="; | |
18 $this->get_text_from_sectionId_url = $lgserver_url."rest/text/getSectionText?sectionId="; | |
19 $this->save_to_LGService_url = $lgserver_url."rest/text/save"; | |
20 $this->save_new_to_LGService_url = $lgserver_url."rest/text/saveNew"; | |
21 | |
22 | |
25 | 23 |
26 // $this->database = new PDO("mysql:host=localhost;dbname=test", "username", "password"); | 24 // $this->database = new PDO("mysql:host=localhost;dbname=test", "username", "password"); |
27 set_time_limit(0); | 25 set_time_limit(0); |
28 ini_set('memory_limit', '-1'); | 26 ini_set('memory_limit', '-1'); |
29 | 27 |