Class PHPDS_controller

Description

Master controller.

  • author: greg
  • version: 1.0.2 (greg)

Located in /PHPDS_controller.class.php (line 21)

PHPDS_dependant
   |
   --PHPDS_controller
Variable Summary
mixed $_GET
mixed $_POST
Method Summary
void construct ()
whatever, execute ()
scalar|array GET ([string|null $key = null], [mixed|array $default = null], [integer $options = 0])
mixed handleResult (mixed $raw_data)
scalar|array POST ([string|null $key = null], [mixed|array $default = null], [integer $options = 0])
mixed run ()
mixed runAJAX ()
mixed, viaAJAX ()
Variables
mixed $_GET (line 24)
  • access: protected
mixed $_POST (line 23)
  • access: protected

Inherited Variables

Inherited from PHPDS_dependant

PHPDS_dependant::$dependance
PHPDS_dependant::$parent
Methods
construct (line 26)
  • access: public
void construct ()

Redefinition of:
PHPDS_dependant::construct()
Empty function called by the actual constructor; meant to be overriden
execute (line 176)

This method is meant to be the entry point of your class. Most checks and cleanup should have been done by the time it's executed

  • return: if you return "false" output will be truncated
  • access: public
whatever, execute ()
GET (line 75)

Return a value from the _GET meta array

  • return: the content of the get variable or the whole array, possibly with default value(s)
  • author: greg
  • version: 1.0
  • date: 20101016 (v1.0) (greg) added
  • access: public
scalar|array GET ([string|null $key = null], [mixed|array $default = null], [integer $options = 0])
  • string|null $key: the name of the get variable to fetch; if null, the entire array is returned
  • mixed|array $default: a default value to return when the get variable is not set; when returning the entire array, an array can be given here with default values
  • integer $options
handleResult (line 143)

Deal with the controller's output

mixed handleResult (mixed $raw_data)
  • mixed $raw_data
POST (line 52)

Return a value from the _POST meta array

  • return: the content of the post variable or the whole array, possibly with default value(s)
  • author: greg
  • version: 1.0
  • date: 20101016 (v1.0) (greg) added
  • access: public
scalar|array POST ([string|null $key = null], [mixed|array $default = null], [integer $options = 0])
  • string|null $key: the name of the post variable to fetch; if null, the entire array is returned
  • mixed|array $default: a default value to return when the post variable is not set; when returning the entire array, an array can be given here with default values
  • integer $options
run (line 95)

Does security check and runs controller.

  • author: greg <greg@phpdevshell.org>
  • version: 1.1
  • date: 20110307 (v1.1) (greg) calls via Ajax don't exit anymore but empty the template output instead
  • access: public
mixed run ()
runAJAX (line 117)

Run a controller when called with ajax

mixed runAJAX ()
viaAJAX (line 186)

This method is run if your controller is called in an ajax context

  • return: there are 3 cases: "true" (or nothing) the output will be handled by the template the usual way, "false" it's an error, otherwise the result data will be displayed in an empty template
  • access: public
mixed, viaAJAX ()

Inherited Methods

Inherited From PHPDS_dependant

PHPDS_dependant::__construct()
PHPDS_dependant::construct()
PHPDS_dependant::debugInstance()
PHPDS_dependant::factory()
PHPDS_dependant::factoryWith()
PHPDS_dependant::info()
PHPDS_dependant::log()
PHPDS_dependant::PHPDS_dependance()
PHPDS_dependant::_log()
PHPDS_dependant::__call()
PHPDS_dependant::__get()
PHPDS_dependant::__set()

Documentation generated on Tue, 09 Aug 2011 09:05:01 +0200 by phpDocumentor 1.4.3