Class: Base

Source Location: /system/helpers/Base.php

Class Overview [line 33]


This application 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.

Author(s):

Version:

Copyright:

  • Andrew Judd, 2010

Variables

Constants

Methods


Child classes:

BaseModel
This application 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.
BaseController
This application 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.
URI
This application 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.
Router
This application 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.

Inherited Variables

Inherited Constants

Inherited Methods



Class Details

This application 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.

This application 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. This application 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.

Tags:

[ Top ]


Class Variables

static $arguments = array ()

[line 70]

Stores the list of any arguments which will be passed into the function if required. extra URI parameters (i. provided through $_GET which will be bound to the variable names as dictated in $_GET.

Stores the list of any arguments which will be passed into the function if required. If used, this will be an array which starts at 0 with all extra URI parameters (i.e. $uri [ 1 ] onwards) as well as any information provided through $_GET which will be bound to the variable names as dictated in $_GET.

Tags:

  • access - public

Type: mixed

Overrides:

[ Top ]

static $config =  NULL

[line 45]

Stores all of the configuration settings for the application. either be NULL or an array.

Stores all of the configuration settings for the application. This should either be NULL or an array.

Tags:

  • access - protected

Type: mixed

Overrides:

[ Top ]

static $db_conns =  NULL

[line 75]

An array of elements which will contain all of the database connections.

An array of elements which will contain all of the database connections.

Tags:

  • access - protected

Type: mixed

Overrides:

[ Top ]

static $errorMessages =  NULL

[line 61]

Stores the list of error messages which will come from the template engine.

Stores the list of error messages which will come from the template engine. Only available through this class.

Tags:

  • access - protected

Type: mixed

Overrides:

[ Top ]

static $errors =  NULL

[line 39]

Stores any errors which have occurred while loading or handling of the information.

Stores any errors which have occurred while loading or handling of the information.

Tags:

  • access - public

Type: mixed

Overrides:

[ Top ]

static $parameters =  NULL

[line 55]

Stores the parameters from the URL to pass into the function call.

Stores the parameters from the URL to pass into the function call.

Tags:

  • access - public

Type: mixed

Overrides:

[ Top ]

static $uri =  NULL

[line 50]

Stores the URI information about the page the user is currently on.

Stores the URI information about the page the user is currently on.

Tags:

  • access - public

Type: mixed

Overrides:

[ Top ]


Class Methods

static libxml_display_error

static void libxml_display_error( $error)

[line 544]

Tags:

  • access - private

Parameters:

  • $error -

[ Top ]

static libxml_display_errors

static void libxml_display_errors( )

[line 532]

Tags:

  • access - private

Parameters:

[ Top ]

static __getErrorMessage

static string __getErrorMessage( $key $key)

[line 512]

This function is used in order to get external access to the list of error messages from a non-Base object class.

This function is used in order to get external access to the list of error messages from a non-Base object class.

Tags:

  • return - - The error message which corresponds to the key, or NULL if the error message at the key doesn't exist
  • access - public

Parameters:

  • $key $key - - The key for the error message which is desired

[ Top ]

static __handleView

static void __handleView( string $viewSection, array/string $views, $arrayBase, $vars)

[line 306]

This function is used internally in order to handle the actual processing of everything to do with the view. pieces and then present it in the specified order (as decided by where it is within the array.

This function is used internally in order to handle the actual processing of everything to do with the view. It will break the view up into several pieces and then present it in the specified order (as decided by where it is within the array.

Tags:

  • access - private

Parameters:

  • string $viewSection - - The part of the view we are in. Should be one of Base::VIEW_HEADER, Base::VIEW_BODY, BASE::VIEW_FOOTER
  • array $arrayBase - - The baseline set of variables which will be sent to each of the views
  • array $vars - - The list of all variables to be provided in the view
  • array/string $views - - Either and array of views to load, or a single view

[ Top ]

static __initialize

static void __initialize( [array $config = NULL])

[line 110]

This function is used in order to initialize the configuration object if needed as well as set up the error messages based on the XML file located in the directory as speicified by the configuration file.

This function is used in order to initialize the configuration object if needed as well as set up the error messages based on the XML file located in the directory as speicified by the configuration file.

Tags:

  • access - public

Parameters:

  • array $config - - The configuration for the application

[ Top ]

static __loadController

static boolean __loadController( $controller $controller)

[line 175]

This fucntion is used in order load a specific controller into the memory so that it is able to be used later on (from the controller folder).

This fucntion is used in order load a specific controller into the memory so that it is able to be used later on (from the controller folder).

Tags:

  • return - - TRUE if the load was succesful, FALSE otherwise
  • access - public

Parameters:

  • $controller $controller - - The Controller which we will be loading

[ Top ]

static __loadHelper

static boolean __loadHelper( string $helper)

[line 129]

This function can be used anywhere in order to load a specific helper library in order to allow it to be used later on.

This function can be used anywhere in order to load a specific helper library in order to allow it to be used later on.

Tags:

  • return - - TRUE if the library has been loaded, FALSE otherwise
  • access - public

Parameters:

  • string $helper - - The name of the library to load

[ Top ]

static __loadView

static boolean __loadView( $view $view, [$vars $vars = array ()])

[line 406]

This function is used to actually load the specified view on the page.

This function is used to actually load the specified view on the page. It starts by converting all of the predefined variables to variables for the page, and then it will check if the view exists. If yes, then it will include it.

Tags:

  • return - - True if the displaying of the view was successful, False otherwise
  • access - public

Parameters:

  • $view $view - - The view to load
  • $vars $vars - - The variables which are accessible by the view

[ Top ]

static __loadViews

static void __loadViews( $views, [array $vars = array ()])

[line 253]

This function is used in order to load multiple views and display them on the page.

This function is used in order to load multiple views and display them on the page.

Tags:

  • access - public

Parameters:

  • array $views - - An array of views which will be loaded. There are three keys which can be used within this section. They are as follows:
    • <em>header</em> - The information which will appear at the top of the page.
    • <em>body</em> - The information which will appear in between the header and the footer of the web site.
    • <em>footer</em> - The information which will appear at the end of your web site.
    <strong>Please Note</strong>: At least one of these elements should exist within the array which is passed into this function or else nothing will be emitted. <strong>Please Note</strong>: Each of these elements can either be a single view or an array of views which will all be displayed.
  • array $vars - - An array containing an array of all variables which will be passed to each of the views. Similar to the $views array, will pass all variables which are listed for those elements to only their corresponding views. Any variables outside of the three keywords (header, body, footer) will be sent to each of the views. <strong>Please Note</strong>: variables will receive the variable name which corresponds to the key in the array. For example, if you have an array: array ( 'foo' => 'bar' ), within the view, you are able to access this variable through $foo.

[ Top ]

static __loadXML

static void __loadXML( $xmlFile $xmlFile, &$xmlData &$xmlData, [$schema $schema = NULL])

[line 466]

This function is used in order to load any flat XML file into an array.

This function is used in order to load any flat XML file into an array. It will take in a file and then load each of the elements into an array based on the element names.

Tags:

  • access - public

Parameters:

  • $xmlFile $xmlFile - - The file name to load
  • &$xmlData &$xmlData - - The variable to store the array information into
  • $schema $schema - - NULL by default, means that it will not be validated against any schema, however if a filename is provided, then the XML file will be validated.

[ Top ]

__construct

Base __construct( [array $config = NULL])

[line 95]

Constructor, will create the Base object setting up anything that it requires.

Constructor, will create the Base object setting up anything that it requires.

Tags:

  • access - public

Overridden in child classes as:

BaseModel::__construct()
BaseController::__construct()
The no argument constructor.
MainController::__construct()
ErrorsController::__construct()

Parameters:

  • array $config - - The configuration for the application

[ Top ]


Class Constants

DATABASE =  'database'

[line 88]

Constants for the configuration variable.

Constants for the configuration variable.

[ Top ]

VIEW_BODY =  'body'

[line 82]

[ Top ]

VIEW_FOOTER =  'footer'

[line 83]

[ Top ]

VIEW_HEADER =  'header'

[line 81]

Constants for the pre-defined 'header', 'body', and 'footer' elements of the array.

Constants for the pre-defined 'header', 'body', and 'footer' elements of the array.

[ Top ]


Documentation generated on Thu, 01 Jul 2010 20:37:13 -0400 by phpDocumentor 1.4.3