Overview

Namespaces

  • Simpletools
    • Autoload
    • Config
    • Db
      • Mysql
    • Event
    • Http
    • Mvc
    • Page
    • Store

Classes

  • Common
  • Controller
  • Model
  • Router
  • RoutingHook
  • View
  • Overview
  • Namespace
  • Class

Class Common

MVC Common Methods

Direct known subclasses

Simpletools\Mvc\Controller, Simpletools\Mvc\Router, Simpletools\Mvc\View
Namespace: Simpletools\Mvc
Located at Simpletools/Mvc/Common.php
Methods summary
public static string
# getCorrectActionName( string $action )

Action name normaliser

Action name normaliser

Parameters

$action
Action name to normalise

Returns

string
Normalised action name
public static string
# getCorrectControllerName( string $controller )

Controller name normaliser

Controller name normaliser

Parameters

$controller
Controller name to normalise

Returns

string
Normalised controller name
public mixed
# isPost( string $id = false, integer $filter = null, array $filterOptions = array() )

HTTP POST checker

HTTP POST checker

Parameters

$id
POST key to check
$filter
Filter type - http://php.net/manual/en/filter.filters.sanitize.php
$filterOptions
Filter options

Returns

mixed
boolean if no filter is set
public mixed
# isQuery( string $id = false, integer $filter = null, array $filterOptions = array() )

HTTP GET checker

HTTP GET checker

Parameters

$id
GET key to check
$filter
Filter type - http://php.net/manual/en/filter.filters.sanitize.php
$filterOptions
Filter options

Returns

mixed
boolean if no filter is set
public mixed
# isRequest( string $id = false, integer $filter = null, array $filterOptions = array() )

HTTP REQUEST checker

HTTP REQUEST checker

Parameters

$id
REQUEST key to check
$filter
Filter type - http://php.net/manual/en/filter.filters.sanitize.php
$filterOptions
Filter options

Returns

mixed
boolean if no filter is set
public mixed
# getQuery( string $id = null, integer $sanitizeFilter = FILTER_SANITIZE_STRING, array $sanitizeFilterOptions = array('flags'=>FILTER_FLAG_STRIP_HIGH) )

HTTP GET getter

HTTP GET getter

Parameters

$id
GET key to return
$sanitizeFilter
Sanitize Filter type - http://php.net/manual/en/filter.filters.sanitize.php, defaults to FILTER_SANITIZE_STRING
$sanitizeFilterOptions
Sanitize Filter options

Returns

mixed
GET value or values if $id is not provided
public mixed
# getPost( string $id = null, integer $sanitizeFilter = FILTER_SANITIZE_STRING, array $sanitizeFilterOptions = array('flags'=>FILTER_FLAG_STRIP_HIGH) )

HTTP POST getter

HTTP POST getter

Parameters

$id
POST key to return
$sanitizeFilter
Sanitize Filter type - http://php.net/manual/en/filter.filters.sanitize.php, defaults to FILTER_SANITIZE_STRING
$sanitizeFilterOptions
Sanitize Filter options

Returns

mixed
POST value or values if $id is not provided
public mixed
# getRequest( string $id = null, integer $sanitizeFilter = FILTER_SANITIZE_STRING, array $sanitizeFilterOptions = array('flags'=>FILTER_FLAG_STRIP_HIGH) )

HTTP REQUEST getter

HTTP REQUEST getter

Parameters

$id
REQUEST key to return
$sanitizeFilter
Sanitize Filter type - http://php.net/manual/en/filter.filters.sanitize.php, defaults to FILTER_SANITIZE_STRING
$sanitizeFilterOptions
Sanitize Filter options

Returns

mixed
REQUEST value or values if $id is not provided
public array
# returnParams( string $type )

Returns all params by type

Returns all params by type

Parameters

$type
Type of the params to return, accepted values - associative or number

Returns

array
Returns all params a per specified type
public
# setParams( & $params, & $shifted_params )
public boolean
# isParam( string $key )

Is URL Param by key name

Is URL Param by key name

Parameters

$key
Name of the requested param

Returns

boolean
Returns true or false
public mixed
# getParam( string $key = '' )

Get URL Param by key name

Get URL Param by key name

Parameters

$key
Name of the requested param

Returns

mixed
Returns requested param value or all params if key is not specified or null if key doesn't exist
public string
# getParam_( integer $index )

Get URL Param by index

Get URL Param by index

Deprecated

2.0.15 Use getParamByIndex() instead

Parameters

$index
Position of the param starting from 0

Returns

string
Returns requested param value
public string
# getParamByIndex( integer $index )

Get URL Param by index

Get URL Param by index

Parameters

$index
Position of the param starting from 0

Returns

string
Returns requested param value
public boolean
# isParam_( integer $index )

Is Param by index

Is Param by index

Deprecated

2.0.15 Use isParamByIndex() instead

Parameters

$index
Position of the param starting from 0

Returns

boolean
Returns true or false
public boolean
# isParamByIndex( integer $index )

Is Param by index

Is Param by index

Parameters

$index
Position of the param starting from 0

Returns

boolean
Returns true or false
public
# location( $location, $type = 302 )
public
# redirect( $params, $addslash = false, $protocol = false, $type = 301, $HTTP_GET = '' )
API documentation generated by ApiGen