@@ -22,7 +22,7 @@ |
||
| 22 | 22 | * You should have received a copy of the GNU General Public License |
| 23 | 23 | * along with this program; if not, write to the Free Software |
| 24 | 24 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 25 | - */ |
|
| 25 | + */ |
|
| 26 | 26 | |
| 27 | 27 | |
| 28 | 28 | class Url{ |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | * You should have received a copy of the GNU General Public License |
| 23 | 23 | * along with this program; if not, write to the Free Software |
| 24 | 24 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 25 | - */ |
|
| 25 | + */ |
|
| 26 | 26 | class Session{ |
| 27 | 27 | |
| 28 | 28 | /** |
@@ -22,23 +22,23 @@ discard block |
||
| 22 | 22 | * You should have received a copy of the GNU General Public License |
| 23 | 23 | * along with this program; if not, write to the Free Software |
| 24 | 24 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 25 | - */ |
|
| 25 | + */ |
|
| 26 | 26 | |
| 27 | 27 | class Router { |
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | - * @var array $pattern: The list of URIs to validate against |
|
| 31 | - */ |
|
| 30 | + * @var array $pattern: The list of URIs to validate against |
|
| 31 | + */ |
|
| 32 | 32 | private $pattern = array(); |
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | - * @var array $callback: The list of callback to call |
|
| 36 | - */ |
|
| 35 | + * @var array $callback: The list of callback to call |
|
| 36 | + */ |
|
| 37 | 37 | private $callback = array(); |
| 38 | 38 | |
| 39 | 39 | /** |
| 40 | - * @var string $uriTrim: The char to remove from the URIs |
|
| 41 | - */ |
|
| 40 | + * @var string $uriTrim: The char to remove from the URIs |
|
| 41 | + */ |
|
| 42 | 42 | protected $uriTrim = '/\^$'; |
| 43 | 43 | |
| 44 | 44 | /** |
@@ -94,9 +94,9 @@ discard block |
||
| 94 | 94 | */ |
| 95 | 95 | public function __construct(){ |
| 96 | 96 | $this->logger =& class_loader('Log', 'classes'); |
| 97 | - $this->logger->setLogger('Library::Router'); |
|
| 98 | - $routesPath = CONFIG_PATH . 'routes.php'; |
|
| 99 | - $this->logger->debug('Loading of routes configuration file --> ' . $routesPath . ' ...'); |
|
| 97 | + $this->logger->setLogger('Library::Router'); |
|
| 98 | + $routesPath = CONFIG_PATH . 'routes.php'; |
|
| 99 | + $this->logger->debug('Loading of routes configuration file --> ' . $routesPath . ' ...'); |
|
| 100 | 100 | if(file_exists($routesPath)){ |
| 101 | 101 | $this->logger->info('Found routes configuration file --> ' . $routesPath. ' now load it'); |
| 102 | 102 | require_once $routesPath; |
@@ -147,11 +147,11 @@ discard block |
||
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | /** |
| 150 | - * Add the URI and callback to the list of URIs to validate |
|
| 151 | - * |
|
| 152 | - * @param string $uri the request URI |
|
| 153 | - * @param object $callback the callback function |
|
| 154 | - */ |
|
| 150 | + * Add the URI and callback to the list of URIs to validate |
|
| 151 | + * |
|
| 152 | + * @param string $uri the request URI |
|
| 153 | + * @param object $callback the callback function |
|
| 154 | + */ |
|
| 155 | 155 | public function add($uri, $callback) { |
| 156 | 156 | $uri = trim($uri, $this->uriTrim); |
| 157 | 157 | if(in_array($uri, $this->pattern)){ |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | * You should have received a copy of the GNU General Public License |
| 23 | 23 | * along with this program; if not, write to the Free Software |
| 24 | 24 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 25 | - */ |
|
| 25 | + */ |
|
| 26 | 26 | |
| 27 | 27 | class Security{ |
| 28 | 28 | |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | * You should have received a copy of the GNU General Public License |
| 23 | 23 | * along with this program; if not, write to the Free Software |
| 24 | 24 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 25 | - */ |
|
| 25 | + */ |
|
| 26 | 26 | |
| 27 | 27 | /** |
| 28 | 28 | * This class represent the event dispatcher management, permit to record the listener and |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | * You should have received a copy of the GNU General Public License |
| 23 | 23 | * along with this program; if not, write to the Free Software |
| 24 | 24 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 25 | - */ |
|
| 25 | + */ |
|
| 26 | 26 | class Loader{ |
| 27 | 27 | |
| 28 | 28 | /** |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | * You should have received a copy of the GNU General Public License |
| 23 | 23 | * along with this program; if not, write to the Free Software |
| 24 | 24 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 25 | - */ |
|
| 25 | + */ |
|
| 26 | 26 | |
| 27 | 27 | class Request{ |
| 28 | 28 | |
@@ -1,28 +1,28 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | defined('ROOT_PATH') || exit('Access denied'); |
| 3 | 3 | /** |
| 4 | - * TNH Framework |
|
| 5 | - * |
|
| 6 | - * A simple PHP framework using HMVC architecture |
|
| 7 | - * |
|
| 8 | - * This content is released under the GNU GPL License (GPL) |
|
| 9 | - * |
|
| 10 | - * Copyright (C) 2017 Tony NGUEREZA |
|
| 11 | - * |
|
| 12 | - * This program is free software; you can redistribute it and/or |
|
| 13 | - * modify it under the terms of the GNU General Public License |
|
| 14 | - * as published by the Free Software Foundation; either version 3 |
|
| 15 | - * of the License, or (at your option) any later version. |
|
| 16 | - * |
|
| 17 | - * This program is distributed in the hope that it will be useful, |
|
| 18 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 19 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 20 | - * GNU General Public License for more details. |
|
| 21 | - * |
|
| 22 | - * You should have received a copy of the GNU General Public License |
|
| 23 | - * along with this program; if not, write to the Free Software |
|
| 24 | - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|
| 25 | - */ |
|
| 4 | + * TNH Framework |
|
| 5 | + * |
|
| 6 | + * A simple PHP framework using HMVC architecture |
|
| 7 | + * |
|
| 8 | + * This content is released under the GNU GPL License (GPL) |
|
| 9 | + * |
|
| 10 | + * Copyright (C) 2017 Tony NGUEREZA |
|
| 11 | + * |
|
| 12 | + * This program is free software; you can redistribute it and/or |
|
| 13 | + * modify it under the terms of the GNU General Public License |
|
| 14 | + * as published by the Free Software Foundation; either version 3 |
|
| 15 | + * of the License, or (at your option) any later version. |
|
| 16 | + * |
|
| 17 | + * This program is distributed in the hope that it will be useful, |
|
| 18 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 19 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 20 | + * GNU General Public License for more details. |
|
| 21 | + * |
|
| 22 | + * You should have received a copy of the GNU General Public License |
|
| 23 | + * along with this program; if not, write to the Free Software |
|
| 24 | + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|
| 25 | + */ |
|
| 26 | 26 | |
| 27 | 27 | class Module{ |
| 28 | 28 | |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | * You should have received a copy of the GNU General Public License |
| 23 | 23 | * along with this program; if not, write to the Free Software |
| 24 | 24 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 25 | - */ |
|
| 25 | + */ |
|
| 26 | 26 | |
| 27 | 27 | class Log{ |
| 28 | 28 | |