Overview

Namespaces

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

Classes

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

Class Router

MVC Router

Simpletools\Mvc\Common
Extended by Simpletools\Mvc\Router
Namespace: Simpletools\Mvc
Located at Simpletools/Mvc/Router.php
Methods summary
public
# __construct( array $settings = null )
protected
# _addCustomRoutes( $routes, $method = 'ANY' )
protected array
# _parseCustomRoutes( string $path, array $invoke )

Custom routes parser

Custom routes parser

Internal custom routes parser/compiler

Parameters

$path
Uri path to match against
$invoke
Action to perform if $path matches current URI.

Returns

array
Array of compiled custom routes
public
# registerRoutingNamespaces( $namespaces )
public
# getActiveRoutingNamespaceDir( )
public
# getActiveRoutingNamespaceUrlPath( )
public
# getActiveRoutingNamespace( $useDirectorySeparator = false )
public static &
# getInstance( array $settings = null )
public static &
# settings( array $settings )
public
# registerObject( $objectName, & $object )
public
# registerViewObject( $objectName, & $object )
public static &
# run( $dir_emulate = false )
public &
# dispatch( $dir_emulate = false )
public
# disable404OnError( )
public
# enable404OnError( )
public
# error( $errorCode = 'v404' )
public
# forward( $controller, $action = null, $params = false )
public
# enableView( )
public
# disableView( )
protected
# _render( $controller, $view = null )
protected
# _getSubdomain( )
public
# isController( $controller )
public
# getParams( $fix_duplicate_content = false )
public
# setParam( $id, $value )
public
# getDisplayedParam( $id )
public
# getDisplayedParam_( $id )
public
# url( array $urls, $slashEnd = false, $https = false, $absolute = false )
public
# isError404( )
public
# setViewProperty( $key, $value )
public
# __destruct( )
Methods inherited from Simpletools\Mvc\Common
getCorrectActionName(), getCorrectControllerName(), getParam(), getParamByIndex(), getParam_(), getPost(), getQuery(), getRequest(), isParam(), isParamByIndex(), isParam_(), isPost(), isQuery(), isRequest(), location(), redirect(), returnParams(), setParams()
Constants summary
integer NOSLASH_NOINDEX
# 1
integer SLASH_NOINDEX
# 2
integer NOSLASH_INDEX
# 3
integer SLASH_INDEX
# 4
Properties summary
protected string $_appDir
# ''
protected boolean $_forwarded
# false
protected string $_params
# ''
protected boolean $_autoRender
# true
protected boolean $_errorCode
# false
protected $_error
# null
protected array $_classes
# array()
protected boolean $_404_error_header
# true
protected boolean $_enableRouterHooks
# false
protected boolean $_shifts_params
# false
protected boolean $_objects
# false
protected array $_routingNamespaces
# array()
protected string $_activeRoutingNamespace
# ''
protected string $_activeRoutingNamespaceUrlPath
# ''
protected string $_view
# ''
protected boolean $_view_enabled
# true
protected boolean $_customRoutes
# false
protected boolean $_activeCustomRouteArgs
# false
protected array $_httpMethods
# array( "OPTIONS" => "OPTIONS", "GET" => "GET", "HEAD" => "HEAD", "POST" => "POST", "PUT" => "PUT", "DELETE" => "DELETE", "TRACE" => "TRACE", "CONNECT" => "CONNECT", )
API documentation generated by ApiGen