Version: current

# Class RootURLController

  Object
  ViewableData implements IteratorAggregate
  RequestHandler
  Controller
  RootURLController

Package: sapphire\control
Located at sapphire/core/control/RootURLController.php

## Methods summary

`public static string` | # `get_homepage_link( )` Get the full form (e.g. /home/) relative link to the home page for the current HTTP_HOST value. Note that the link is trimmed of leading and trailing slashes before returning to ensure consistency. Get the full form (e.g. /home/) relative link to the home page for the current HTTP_HOST value. Note that the link is trimmed of leading and trailing slashes before returning to ensure consistency. #### Returns `string` string #### Used by ``SiteTree::RelativeLink()``
`public static string` | # `get_default_homepage_link( )` Gets the link that denotes the homepage if there is not one explicitly defined for this HTTP_HOST value. Gets the link that denotes the homepage if there is not one explicitly defined for this HTTP_HOST value. #### Returns `string` string
`public static boolean` | # `should_be_on_root( `SiteTree` $page )` Returns TRUE if a request to a certain page should be redirected to the site root (i.e. if the page acts as the home page). Returns TRUE if a request to a certain page should be redirected to the site root (i.e. if the page acts as the home page). #### Parameters $page SiteTree $page #### Returns `boolean` bool
`public static` | # `reset( )` Resets the cached homepage link value - useful for testing. Resets the cached homepage link value - useful for testing.
`public `SS_HTTPResponse`` | # `handleRequest( `SS_HTTPRequest` $request )` #### Parameters $request SS_HTTPRequest $request #### Returns ``SS_HTTPResponse`` SS_HTTPResponse #### Overrides `Controller::handleRequest`

### Methods inherited from Controller

`CurrentMember()`, `Now()`, `PastMember()`, `PastVisitor()`, `can()`, `curr()`, `defaultAction()`, `disableBasicAuth()`, `getAction()`, `getFormOwner()`, `getRequest()`, `getResponse()`, `getSession()`, `getURLParams()`, `getViewer()`, `handleAction()`, `hasAction()`, `hasActionTemplate()`, `has_curr()`, `init()`, `isAjax()`, `join_links()`, `popCurrent()`, `pushCurrent()`, `redirect()`, `redirectBack()`, `redirectedTo()`, `render()`, `setSession()`, `setURLParams()`

### Methods inherited from RequestHandler

`__construct()`, `allowedActions()`, `checkAccessAction()`, `httpError()`

### Methods inherited from ViewableData

`ATT_val()`, `BaseHref()`, `CSSClasses()`, `ColumnBreak()`, `ColumnCalc()`, `ColumnNumber()`, `ColumnPad()`, `ColumnPos()`, `CurrentPage()`, `Debug()`, `Even()`, `EvenOdd()`, `First()`, `FirstLast()`, `HasPerm()`, `IsAjax()`, `JS_val()`, `Last()`, `Me()`, `Middle()`, `MiddleString()`, `Modulus()`, `MultipleOf()`, `Odd()`, `Pos()`, `RAW_val()`, `SQL_val()`, `ThemeDir()`, `ThemeName()`, `Top()`, `TotalItems()`, `XML_val()`, `__get()`, `__isset()`, `__set()`, `buildCastingCache()`, `cachedCall()`, `castingClass()`, `castingHelper()`, `castingHelperPair()`, `castingObjectCreator()`, `castingObjectCreatorPair()`, `customise()`, `defineMethods()`, `escapeTypeForField()`, `getField()`, `getIterator()`, `getSecurityID()`, `getXMLValues()`, `hasField()`, `hasValue()`, `i18nLocale()`, `iteratorProperties()`, `obj()`, `renderWith()`, `setCustomisedObj()`, `setField()`

### Methods inherited from Object

`__call()`, `__toString()`, `__wakeup()`, `addMethodsFrom()`, `addStaticVars()`, `addWrapperMethod()`, `add_extension()`, `add_static_var()`, `allMethodNames()`, `cacheToFile()`, `cacheToFileWithArgs()`, `clearCache()`, `combined_static()`, `create()`, `createMethod()`, `create_from_string()`, `exists()`, `extInstance()`, `extend()`, `getCustomClass()`, `getExtensionInstance()`, `getExtensionInstances()`, `get_extensions()`, `get_static()`, `hasExtension()`, `hasMethod()`, `has_extension()`, `invokeWithExtensions()`, `is_a()`, `loadCache()`, `parentClass()`, `parse_class_spec()`, `remove_extension()`, `sanitiseCachename()`, `saveCache()`, `set_stat()`, `set_static()`, `set_uninherited()`, `stat()`, `strong_create()`, `uninherited()`, `uninherited_static()`, `useCustomClass()`

### Magic methods summary

## Properties summary

`protected static boolean` | $is_at_root | #
`protected static string` | $default_homepage_link | #
`protected static string` | $cached_homepage_link | #

### Properties inherited from Controller

`$action`, `$allowed_actions`, `$baseInitCalled`, `$basicAuthEnabled`, `$controller_stack`, `$request`, `$requestParams`, `$response`, `$session`, `$urlParams`, `$url_handlers`

### Properties inherited from RequestHandler

`$brokenOnConstruct`

### Properties inherited from ViewableData

`$casting`, `$customisedObject`, `$default_cast`, `$failover`, `$iteratorPos`, `$iteratorTotalItems`

### Properties inherited from Object

`$class`, `$extension_instances`, `$extensions`

[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -