mp.class.php
myPortal regitry class
- MP::$GET - escaped $_GET
- MP::$POST - escaped $_POST
- MP::$CONFIG - content of configuration table
- MP::$DB - db connection
- MP::$SESSION - equals $_SESSION['myportal']
- MP::$SELF - $SERVER['PHPSELF']
- MP::$MP - url data and segments
- MP::$TMP - temporary registry
- MP::$DEBUG - sql debug inforamtion
- MP::$TABLE - tables schemas
Usage:
{{lang:php}}
// static variables
echo MP::$GET[1];
if(isset(MP::$POST['password'])) exit();
echo MP::$DB->get_val("SELECT NOW()");
// other functions
if(MP::home()) echo 'this is the default page';
if(MP::version('base')) echo 'this is BASE version';
MP::get_version(); // returns 'base', 'pro' or 'pro+'