Slimore
  • Namespace
  • Class

Namespaces

  • None
  • Slimore
    • Cache
      • Exception
    • Captcha
    • Database
    • Debug
    • Http
    • Image
    • Log
    • Middleware
    • Mvc
    • Pagination
    • Upload

Classes

  • Application
  • Controller
  • Model
  • View

Exceptions

  • Exception

Class Controller

Class Controller

Namespace: Slimore\Mvc
Package: Slimore\Mvc
Author: Pandao
Located at Slimore/Mvc/Controller.php

Methods summary

public
# __construct( )

Constructor

Constructor

protected
# init( )

Initialization (supplementary) method

Initialization (supplementary) method

protected mixed
# dbConnection( string $name = null )

Parameters

$name
null

Returns

mixed
public string
# json( array $array, boolean $return = false )

Parameters

$array
$return
false

Returns

string
public string
# js( string|array $script, boolean $wrap = false )

Using javascript

Using javascript

Parameters

$script
$wrap
false

Returns

string
public string
# javascript( string|array $script, boolean $wrap = false )

Alias js() method

Alias js() method

Parameters

$script
$wrap
false

Returns

string
public
# printr( mixed $array )

Using pre format tag formatted printing array

Using pre format tag formatted printing array

Parameters

$array
public string
# console( string $message, string $type = "log" )

Like/Using javascript console object

Like/Using javascript console object

Parameters

$message
$type
"log"

Returns

string
public string
# gotoURL( string $url, boolean $base = true )

Using javascript location.href go to url

Using javascript location.href go to url

Parameters

$url
$base
true

Returns

string
protected mixed
# config( string $name )

Application (re)configure

Application (re)configure

Parameters

$name

Returns

mixed
protected
# redirect( string $path )

Redirect controller

Redirect controller

Parameters

$path
protected
# render( string $tpl, array $data = [], string $suffix,… )

Override \Slim\Slim::render method on controller

Override \Slim\Slim::render method on controller

Parameters

$tpl
$data
[]
$suffix,…
protected
# setViewPath( string $path )

Set view path

Set view path

Parameters

$path
protected string
# getViewPath( )

Get view path

Get view path

Returns

string
public mixed
# __get( $name )

Getter

Getter

Parameters

$name

Returns

mixed
public mixed
# __call( $method, $args )

Member method overloading

Member method overloading

Parameters

$method
$args

Returns

mixed
public static mixed
# __callStatic( $method, $args )

Static member method overloading

Static member method overloading

Parameters

$method
$args

Returns

mixed

Properties summary

protected Slim\Slim $app
#
protected mixed $db
#
protected mixed $log
#
protected string $viewPath
# '../app/views/'
protected string $viewSuffix
# '.php'
Slimore API documentation generated by ApiGen