diff classes/loader.php @ 81:f1f849d31272 extractapp

book_id as string
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Thu, 23 Apr 2015 14:58:27 +0200
parents 97c1e5102a22
children
line wrap: on
line diff
--- a/classes/loader.php	Tue Apr 21 16:41:36 2015 +0200
+++ b/classes/loader.php	Thu Apr 23 14:58:27 2015 +0200
@@ -1,7 +1,25 @@
 <?php
+/*
+ * loader.php
+ * This file is part of Extraction-interface.
+ *
+ * Extraction-interface is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Extraction-interface is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Extraction-interface.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
 /** 
-* Loader is used to route parameters from input url and set parameters for controller.
-* The routing is done by the RewriteRule written in .htaccess file.
+ * Loader is used to route parameters from input url and set parameters for controller.
+ * The routing is done by the RewriteRule written in .htaccess file.
 */
 
 class Loader {
@@ -12,13 +30,18 @@
 
 	public function __construct($urlvalues, $postdata) {
 		/** 
-		* It stores the URL values on object creation.
-		* For example, the URL structure is like this: some_domain_name/Extractapp/TaggingText. 
-		* The controller is "Extractapp" and the action is "TaggingText".
-		* For the "Extractapp" controller, there is a corresponding "extractapp.php" in "./controllers" folder.
-		* For the action "TaggingText", there is a corresponding "TaggingText.php" in "./views/Extractapp" folder.
-		* Under "./view" folder, the first level is named by the controller. Each action belongs to the controller is named by its action name.
-		*/
+		 * It stores parameters in URL on object creation.
+		 * 
+		 * For example, the URL structure is like this: some_domain_name/Extractapp/TaggingText. 
+		 * The controller is "Extractapp" and the action is "TaggingText".
+		 *
+		 * For the "Extractapp" controller, there is a corresponding "extractapp.php" in "./controllers" folder.
+		 *
+		 * For the action "TaggingText", there is a corresponding "TaggingText.php" in "./views/Extractapp" folder.
+		 * 
+		 * Under "./view" folder, the first level of the sub-folder is named by the controller's name. 
+		 * Each action controlled by the controller has it's own php file. The file name is the same as the the action's name.
+		 */
 
 		$this->urlvalues = $urlvalues;
 		$this->postdata = $postdata;
@@ -39,9 +62,9 @@
 	
 	public function CreateController() {
 		/** 
-		* Establish the requested controller as an object, and check if the query is valid.
-		* The queried controller, which should be extended from BaseController, exists and the queried action should be one of its method.
-		*/
+		 * Establish the requested controller as an object, and check if the query is valid.
+		 * The queried controller, which should be extended from BaseController, exists and the queried action should be one of its method.
+		 */
 
 		//does the class exist?
 		if (class_exists($this->controller)) {