Class DSG_Controller

Description

Controller part of the Model-View-Controller setup for the Dissonance Grading package

Parser the request array, filters input, and provides clean data to the model; acts as a link between model and view.

Located in /includes/dsg_controller.class.php (line 24)


	
			
Variable Summary
 obj $dsg
 obj $view
Method Summary
 DSG_Controller DSG_Controller (obj &$view, array $request_array)
 void _check_settings ()
 void _clear_tmpdir ()
 void _default ()
 array _parse_request_array (array $request_array)
 string _saveMIDI ()
Variables
obj $dsg (line 30)
  • var: model part of the MVC setup
  • access: public
obj $view (line 35)
  • var: view part of the MVC setup
  • access: public
Methods
Constructor DSG_Controller (line 43)

The constructor

  • access: public
DSG_Controller DSG_Controller (obj &$view, array $request_array)
  • obj &$view: DSG_View object
  • array $request_array: the raw $_REQUEST array
_check_settings (line 203)

Check if the settings are correct for MIDI support to function, otherwise trigger error

  • access: private
void _check_settings ()
_clear_tmpdir (line 223)

Clear out tmp directory once every 24 hours

  • access: private
void _clear_tmpdir ()
_default (line 165)

Default method to be invoked when no user input is present

Tells the view to display the initial screen of the application

  • access: private
void _default ()
_parse_request_array (line 101)

Function to sanitize and summarize the user input ($_REQUEST array)

  • return: clean data for the DSG class
  • access: private
array _parse_request_array (array $request_array)
  • array $request_array: the raw $_REQUEST array
_saveMIDI (line 180)

Saves MIDI file in designated tmp directory and returns the src attribute

Uses Valentin Schmidts Midi Class 1.6 to create the MIDI file. This package can be downloaded from http://staff.dasdeck.de/valentin/midi/. Since Midi Class 1.6 uses Call-time pass-by-reference, I set the error level to supress warnings while opening the midi.class.php file if allow_call_time_pass_reference is set to off in php.ini.

  • return: value of the src attribute (file path) to the saved MIDI file
  • access: private
string _saveMIDI ()

Documentation generated on Sun, 26 Nov 2006 14:19:33 +0100 by phpDocumentor 1.3.1