Overview

Namespaces

  • Charcoal
    • App
      • Action
      • Config
      • Handler
      • Middleware
      • Module
      • Route
      • Script
      • ServiceProvider
      • Template

Classes

  • ActionRoute
  • ActionRouteConfig
  • RouteConfig
  • RouteManager
  • ScriptRoute
  • ScriptRouteConfig
  • TemplateRoute
  • TemplateRouteConfig

Interfaces

  • RouteInterface
  • Overview
  • Namespace
  • Class

Class TemplateRouteConfig

Charcoal\Config\AbstractConfig
Extended by Charcoal\App\Route\RouteConfig
Extended by Charcoal\App\Route\TemplateRouteConfig
Namespace: Charcoal\App\Route
Located at Charcoal/App/Route/TemplateRouteConfig.php
Methods summary
public Charcoal\App\Route\TemplateRouteConfig
# setTemplate( string|null $template )

Parameters

$template
The template identifier.

Returns

Charcoal\App\Route\TemplateRouteConfig
Chainable

Throws

InvalidArgumentException
If the tempalte parameter is not null or not a string.
public string
# template( )

Returns

string
public string
# defaultController( )

Returns

string
public Charcoal\App\Route\TemplateRouteConfig
# setEngine( string|null $engine )

Parameters

$engine
The engine identifier (mustache, php, or mustache-php).

Returns

Charcoal\App\Route\TemplateRouteConfig
Chainable

Throws

InvalidArgumentException
If the engine is not null or not a string.
public string
# engine( )

Returns

string
public string
# defaultEngine( )

Returns

string
public Charcoal\App\Route\TemplateRouteConfig
# setTemplateData( array $templateData )

Set the template data for the view.

Set the template data for the view.

Parameters

$templateData
The route template data.

Returns

Charcoal\App\Route\TemplateRouteConfig
Chainable
public array
# templateData( )

Get the template data for the view.

Get the template data for the view.

Returns

array
public Charcoal\App\Route\TemplateRouteConfig
# setRedirect( string|string[] $url )

Parameters

$url
Points to a route.

Returns

Charcoal\App\Route\TemplateRouteConfig
Chainable
public string|string[]
# redirect( )

Retrieve the redirection URL.

Retrieve the redirection URL.

Returns

string|string[]
public Charcoal\App\Route\TemplateRouteConfig
# setRedirectMode( mixed $redirectMode )

Set the redirect HTTP status mode. (Must be 3xx)

Set the redirect HTTP status mode. (Must be 3xx)

Parameters

$redirectMode
The HTTP status code.

Returns

Charcoal\App\Route\TemplateRouteConfig
Chainable

Throws

InvalidArgumentException
If the redirect mode is not 3xx.
public integer
# redirectMode( )

Returns

integer
public Charcoal\App\Route\TemplateRouteConfig
# setCache( boolean $cache )

Parameters

$cache
The cache enabled flag.

Returns

Charcoal\App\Route\TemplateRouteConfig
Chainable
public boolean
# cache( )

Returns

boolean
public Charcoal\App\Route\TemplateRouteConfig
# setCacheTtl( integer $ttl )

Parameters

$ttl
The cache Time-To-Live, in seconds.

Returns

Charcoal\App\Route\TemplateRouteConfig
Chainable
public integer
# cacheTtl( )

Returns

integer
Methods inherited from Charcoal\App\Route\RouteConfig
addGroup(), addMethod(), controller(), groups(), ident(), methods(), route(), setController(), setGroups(), setIdent(), setMethods(), setRoute()
API documentation generated by ApiGen