public
|
#
StartSmarty( )
Just starts Smarty (if is not started yet...)
Just starts Smarty (if is not started yet...)
|
public static
MagratheaController::$Smarty
|
#
GetSmarty( )
Gets Smarty object statically
Gets Smarty object statically
Returns
|
public
|
#
Redirect( string $control, string $action )
Calls another action without changing the url
Calls another action without changing the url
Parameters
- $control
- Control to be called
- $action
- Action to be called inside the control
|
public
|
#
ForwardTo( string $control, string $action = null )
Forward to another page (changing the URL and reloading everything)
Forward to another page (changing the URL and reloading everything)
Parameters
- $control
- Control to be called
- $action
- Action to be called inside the control
|
public
itself
|
#
AllowCache( boolean $allow )
Allow static page generation
Allow static page generation
Parameters
- $allow
- Can I save this page as a HTML for you?
Returns
itself
|
public
|
#
formatStaticPageName( string $name )
Formats a static page name, adding .html and fixing other issues...
Formats a static page name, adding .html and fixing other issues...
Parameters
- $name
- Name of the static page
|
public
|
#
GetStatic( string $name, boolean $die = true )
Sets a static name for the page that will be displayed.
When $die is true,
if the page already exists, it will be displayed as it is and the code will be TERMINATED!
Sets a static name for the page that will be displayed.
When $die is true, if the page already exists, it will be displayed as it is and the code will be TERMINATED!
Parameters
- $name
- Static name page
- $die
- Terminate code if static found
|
public
|
#
Display( string $template )
Displays a template with Smarty
Displays a template with Smarty
Parameters
- $template
- Page to display
|
public static
|
#
Load( string $control, string $action, string $params = "" )
With a given control name and action, calls the right function
It will start a new object $controlName and call the $action in it
With a given control name and action, calls the right function
It will start a new object $controlName and call the $action in it
Parameters
- $control
- $controlName Control to be called
- $action
- Action to be called inside the control
- $params
- Params to send to the given action
|
protected
|
#
Json( object $response )
gives the sent response in json
gives the sent response in json
Parameters
- $response
- object to convert to Json
|
public static
|
#
IncludeAllControllers( )
Include all Controllers presents on Controllers folder
Include all Controllers presents on Controllers folder
|
public static
array
|
#
GetAllStatic( )
Get all static files and return them as an array
Get all static files and return them as an array
Returns
array static pages found
|
public static
string
|
#
ClearStatic( )
Removes all static files from static folder
Removes all static files from static folder
Returns
string exec code output
|
public static
|
|
public
|
#
__call( $method_name, $args = array() )
|