Browse Source

dev 2020-09

Max F 5 years ago
parent
commit
6372835436
2 changed files with 22 additions and 21 deletions
  1. 3 2
      Readme.md
  2. 19 19
      src/Readme.md

+ 3 - 2
Readme.md

@@ -1,10 +1,11 @@
-                                         
+
+```
   _  __                          _______        __
  | |/ /__ _ _ __ _ __ ___   __ _|  ___\ \      / /
  | ' // _` | '__| '_ ` _ \ / _` | |_   \ \ /\ / / 
  | . \ (_| | |  | | | | | | (_| |  _|   \ V  V /  
  |_|\_\__,_|_|  |_| |_| |_|\__,_|_|      \_/\_/   
-                                                                                                 
+```
 
 
 # Présentation

+ 19 - 19
src/Readme.md

@@ -8,27 +8,27 @@ class App
 
 
 ```
-boot()
+public static function boot()
 # This method loads helpers files and init the SQL db connection.
 ```
 
 ```
-registerHelpersDir($dir)
+public static function registerHelpersDir($dir)
 # Add a directory to the helpers directories
 ```
 
 ```
-loadHelpers($dir)
+public static function loadHelpers($dir)
 # Load all helpers files in a directory
 ```
 
 ```
-[getDb($instance_name=null, $dsn=null)](Database/Sql/)
-# Load a SQL db connection
+public static function getDb($instance_name=null, $dsn=null)
+# Load a [SQL db connection](Database/Sql/)
 ```
 
 ```
-createOrmItem($table_name, $primary_key_values=[], $db=null)
+public static function createOrmItem($table_name, $primary_key_values=[], $db=null)
 ```
 
 
@@ -40,58 +40,58 @@ class WebApp extends App
 
 
 ```
-boot()
+public static function boot()
 # This method init the PHP session. It also calls App:boot()
 ```
 
 
 ```
-[createTemplate($tpl_path=null, $variables=[], $layout=null, $templates_dirs=null)](Templates/)
-# Create a PHP/HTML template object
+public static function createTemplate($tpl_path=null, $variables=[], $layout=null, $templates_dirs=null)
+# Create a [PHP/HTML template](Templates/) object
 ```
 
 
 ```
-getUser
+public static function getUser()
 # 
 ```
 
 ```
-setUser
+public static function setUser(array $user)
 # 
 ```
 
 ```
-[route](Routing/)
-# Parse the current url and calls the defined controller method regarding the routes configuration.
+public static function route
+# [Routing](Routing/) : Parse the current url and calls the defined controller method regarding the routes configuration.
 ```
 
 ```
-error
+public static function error($http_status = 500, $meta_title = 'Server Error', $h1 = 'Error 500 - Server Error', $message = 'an error has occured')
 # Display an error page
 ```
 
 ```
-error400
+public static function error400($title = 'Bad request', $message = '')
 # 
 ```
 
 ```
-error403
+public static function error403($title = 'Forbidden', $message = 'You are not allowed')
 # 
 ```
 
 ```
-error404
+public static function error404($title = 'Page not Found', $message = "The page you're looking for doesn't exist")
 # 
 ```
 
 ```
-error500
+public static function error500($title = 'Internal Server Error', $message = 'An error has occured')
 # 
 ```
 
 ```
-error503
+public static function error503(title = 'Service Unavailable', $message = 'The service is unavailable')
 # 
 ```