File/myMVC.php

Description

*****************************************************************************

myMVC - Model-View-Controller for PHP * Copyright (C) 2012 Luca Bertoncello * Hartigstrasse, 12 - 01127 Dresden Deutschland * E-Mail: lucabert@lucabert.de, lucabert@lucabert.com * http://www.lucabert.de/ http://www.lucabert.com/ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; version 2.1 of the License. * * This program 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *****************************************************************************

Constants
ALERT_CRITICAL = 3 (line 38)
ALERT_DEBUG = 1 (line 36)
ALERT_SQL = 0 (line 35)

**********************************************

Alert-types for ErrorHandlers **********************************************

ALERT_WARNING = 2 (line 37)
DB_SESSION = 1 (line 140)
FILE_SESSION = 0 (line 139)

********************************************** Defaults for session

To use database session, define the following:

  1.  $config['SESSION_TYPE']           DB_SESSION;
  2.  $config['SESSION_DB']             array(
  3.                                            'table'           => 'dbsession',
  4.                                            'field_sid'       => 'sid',
  5.                                            'field_data'      => 'data',
  6.                                            'field_last_used' => 'last_used',
  7.                                         );
**********************************************

MYMVC_CURRENTVERSION = '0.9.3-20121020' (line 30)

In order to load all myMVC-classes, we use an autoload function.

You can use your own function to load your classes, using spl_autoload_register or just defining a __autoload() function, before including this file!

NAGIOS_CRITICAL = 2 (line 45)
NAGIOS_OK = 0 (line 43)

**********************************************

Alert-types for Nagios **********************************************

NAGIOS_WARNING = 1 (line 44)
PAGE_ERROR = 'http://'.$_SERVER['SERVER_NAME'].dirname($_SERVER['PHP_SELF']).'/../errors/syserror.php' (line 51)

**********************************************

If not already specified, paths for error page **********************************************

Functions
get_called_class (line 178)

********************************************** Function get_called_class is just in PHP >= 5.3.0 available...

So here a rewrite of this function! **********************************************

void get_called_class ()
myMVC_autoload (line 154)

Autoload function.

If the user tried to call a myMVC class

void myMVC_autoload ($class $class)
  • $class $class: Class to load

Documentation generated on Sat, 20 Oct 2012 08:28:30 +0200 by phpDocumentor 1.4.4