TITAN Library for PHP5  5.1.0
Web Software Development Kit for PHP5
controller Class Reference

(experimental) Titan Controller Class More...

Public Member Functions

 __construct (array $options=array())
 
 set_type ($ext, $type=null)
 
 route ($route, $handler=null)
 
 default_route ($handler)
 
 execute ()
 
 __get ($key)
 
 __set ($key, $value)
 
 __isset ($key)
 
 __unset ($key)
 

Protected Member Functions

 parse_parameters ()
 
 handle_external_files ()
 

Detailed Description

(experimental) Titan Controller Class

Class: \tl\core\controller

Author
James E. Bush work@.nosp@m.bush.nosp@m..cc
Version
5.1.0

Constructor & Destructor Documentation

__construct ( array  $options = array())

Constructor

Parameters
array$options(optional) Array of options (default) array()

: Make a list of valid options.

Member Function Documentation

parse_parameters ( )
protected

Parse GET/PUT/POST paramenters.

set_type (   $ext,
  $type = null 
)

Add, remove or replace a type that will handled by handle_external_files()

Parameters
string$extThe file extension
string$type(optional) The MIME type (default) null = delete the type
handle_external_files ( )
protected

Handle pass-through external files.

route (   $route,
  $handler = null 
)

Add/edit/delete a controller route

Parameters
string$routeThe route to mamnage
mixed$handler(optional) The handler for the route (default) null = delete the route
default_route (   $handler)

Add/edit/delete a controller route

Parameters
mixed$handlerThe handler for the default route (default) null = delete the route
execute ( )

Find the correct route for $this->path_info and execute ots handler

__get (   $key)

Get the value of an option

Parameters
string$keyThe key data to retrieve
Returns
mixed
__set (   $key,
  $value 
)

Set the value of the specified option

Parameters
string$keyThe data key to assign the value to
mixed$valueThe value to set
__isset (   $key)

Whether or not an option exists

Parameters
string$keyAn data key to check for
Returns
boolean
__unset (   $key)

Unsets an option

Parameters
string$keyThe key to unset

The documentation for this class was generated from the following file: