Controllers
[ class tree: Controllers ] [ index: Controllers ] [ all elements ]

Class: Controller

Source Location: /rvtwo/classes/controllerClasses/controller.php

Class Overview

RvTwoObject
   |
   --Controller

Class Description: The Parent Class for all Controller Classes in the System. It contains methods for shaping data that is provided to the controller by a Model object into a format required by the Smarty Template. It also offers functionality for importing information contained in system configuration files. See controllersPackage.php for a description of the rvtwo controllers class hierarchy.


Author(s):

  • Jan van der Breggen

Variables

Methods


Child classes:

TabScreen
Class Description: This is the parent class for views displayed in a tabbed menu
MainScreen
Class Description: This is the parent class for every controller that is connected to a main application window, displaying the Main System Menu and Application Name on top

Inherited Methods

Class: RvTwoObject

RvTwoObject::convertConfigFileToArray()
Converts the contents of a configuration file stored in the filesystem location specified by the PATH_CONF constant into an associative array. The lefthand value of each line in the config file in this array is the key and the right hand item is the value of the array.

Class Details

[line 13]
Class Description: The Parent Class for all Controller Classes in the System. It contains methods for shaping data that is provided to the controller by a Model object into a format required by the Smarty Template. It also offers functionality for importing information contained in system configuration files. See controllersPackage.php for a description of the rvtwo controllers class hierarchy.

Created On: 30 March 2009




Tags:

author:  Jan van der Breggen


[ Top ]


Class Variables

$className =

[line 25]



Tags:

access:  protected

Type:   mixed


[ Top ]

$package =

[line 23]



Tags:

access:  protected

Type:   mixed


[ Top ]

$subPackage =

[line 24]



Tags:

access:  protected

Type:   mixed


[ Top ]

$uiElements =

[line 22]



Tags:

access:  public

Type:   mixed


[ Top ]

$View = array()

[line 20]

Array containing all data that is passed to the Smarty View



Tags:

access:  public

Type:   array


[ Top ]

$viewTemplate =

[line 21]



Tags:

access:  public

Type:   mixed


[ Top ]



Class Methods


method applyAccessRestrictionsToMenuArray [line 79]

void applyAccessRestrictionsToMenuArray( $array)



Parameters:

   $array  

[ Top ]

method convertMenuConfigFileToArray [line 98]

associative convertMenuConfigFileToArray( string $fileName, [string $lineDelimiter = ';'], [string $valueDelimiter = ','])

Converts the contents of a screen menu configuration file stored in the filesystem location specified by the PATH_CONF constant into an associative array.

The lefthand value of each line in the config file is treated as an key value of the $GLOBALS['lang'] array. In other words: it is replaced with the corresponding value in the selected application language. This method should only be used when no access restrictions or other operations need to be done on the screen menu as the resulting array will have the menu item names replaced by the label in the system language.




Tags:

return:  array $config representing the menu configuration file


Parameters:

string   $fileName  
string   $lineDelimiter   - character that delimits an entry in the config file
string   $valueDelimiter   - character that separates name and value of an entry in the config file

[ Top ]

method convertRowsArrayToColumnsArray [line 48]

array convertRowsArrayToColumnsArray( array $array, [integer $keyColumn = 0])

converts a rows_array as returned by the ORM and DB classes into an associative array.

The returned array contains a set of arrays that each represent a column of the original query result. These individual arrays are associative arrays, the key being the primary key (or other unique value) of the database record. The function assumes that this is the first column in the query result. If this is not the case the $keyColumn argument should be provided.




Tags:

return:  as described above


Parameters:

array   $array   'rows_array' as returned by DB class $array. The rows_array must contain a value that uniquely identifies the database tupple
integer   $keyColumn   Indicating the column containing the 'key' column

[ Top ]

method makeLanguageMenuArray [line 70]

void makeLanguageMenuArray( $menuArray)



Parameters:

   $menuArray  

[ Top ]

method setPackageInfo [line 114]

void setPackageInfo( $subPackageName, [ $packageName = "Controllers"])



Parameters:

   $subPackageName  
   $packageName  

[ Top ]


Documentation generated on Mon, 18 May 2009 11:21:47 +0200 by phpDocumentor 1.4.1