PHP Class Craft\RetourService

Inheritance: extends craft\BaseApplicationComponent
Mostra file Open project: nystudio107/retour

Protected Properties

Property Type Description
$cachedEntryRedirects
$cachedStaticRedirects
$cachedStatistics

Public Methods

Method Description
clearStatistics ( )
createRedirect ( $redirectsModel )
deleteRedirectByElementId ( integer $elementId, string $locale )
findRedirectMatch ( string $url ) : mixed
getAllEntryRedirects ( ) : Array
getAllStaticRedirects ( ) : Array
getAllStatistics ( ) : array
getLocalizedUris ( $element = null ) : array Returns a list of localized URIs for the passed in element
getMatchesList ( ) : mixed
getPluginName ( ) : string
getRecentStatistics ( $days = 1, $handled ) : array
getRedirectByElementId ( integer $elementId, string $locale ) : Mixed
getRedirectById ( integer $id ) : Mixed
getRedirectByRedirectSrcUrl ( string $srcUrl, string $locale ) : Mixed
getRedirectFromCache ( $url ) : mixed
incrementRedirectHitCount ( &$redirect )
incrementStatistics ( $url, $handled = false )
lookupRedirect ( string $url, mixed $redirects ) : mixed
saveRedirect ( $redirectsModel )
saveRedirectToCache ( $url, mixed $redirect )
saveStaticRedirect ( Retour_StaticRedirectsRecord $record ) : [type] [saveStaticRedirect description]

Method Details

clearStatistics() public method

public clearStatistics ( )

createRedirect() public method

public createRedirect ( $redirectsModel )

deleteRedirectByElementId() public method

public deleteRedirectByElementId ( integer $elementId, string $locale )
$elementId integer The associated elementId
$locale string The locale

findRedirectMatch() public method

public findRedirectMatch ( string $url ) : mixed
$url string the url to match
return mixed the redirect array

getAllEntryRedirects() public method

public getAllEntryRedirects ( ) : Array
return Array All of the entry redirects

getAllStaticRedirects() public method

public getAllStaticRedirects ( ) : Array
return Array All of the static redirects

getAllStatistics() public method

public getAllStatistics ( ) : array
return array All of the statistics

getLocalizedUris() public method

Returns a list of localized URIs for the passed in element
public getLocalizedUris ( $element = null ) : array
return array an array of paths

getMatchesList() public method

public getMatchesList ( ) : mixed
return mixed Returns the list of matching schemes

getPluginName() public method

public getPluginName ( ) : string
return string The name of the plugin

getRecentStatistics() public method

public getRecentStatistics ( $days = 1, $handled ) : array
$days The number of days to get
return array Recent statistics

getRedirectByElementId() public method

public getRedirectByElementId ( integer $elementId, string $locale ) : Mixed
$elementId integer The associated elementId
$locale string The locale
return Mixed The resulting Redirect

getRedirectById() public method

public getRedirectById ( integer $id ) : Mixed
$id integer The redirect's id
return Mixed The resulting Redirect

getRedirectByRedirectSrcUrl() public method

public getRedirectByRedirectSrcUrl ( string $srcUrl, string $locale ) : Mixed
$srcUrl string the redirect's redirectSrcUrl
$locale string The locale
return Mixed The resulting Redirect

getRedirectFromCache() public method

public getRedirectFromCache ( $url ) : mixed
return mixed The redirect

incrementRedirectHitCount() public method

public incrementRedirectHitCount ( &$redirect )

incrementStatistics() public method

public incrementStatistics ( $url, $handled = false )
$url The 404 url

lookupRedirect() public method

public lookupRedirect ( string $url, mixed $redirects ) : mixed
$url string the url to match
$redirects mixed an array of redirects to look through
return mixed the redirect array

saveRedirect() public method

public saveRedirect ( $redirectsModel )

saveRedirectToCache() public method

public saveRedirectToCache ( $url, mixed $redirect )
$redirect mixed The redirect

saveStaticRedirect() public method

[saveStaticRedirect description]
public saveStaticRedirect ( Retour_StaticRedirectsRecord $record ) : [type]
$record Retour_StaticRedirectsRecord the static redirect record to save
return [type]

Property Details

$cachedEntryRedirects protected_oe property

protected $cachedEntryRedirects

$cachedStaticRedirects protected_oe property

protected $cachedStaticRedirects

$cachedStatistics protected_oe property

protected $cachedStatistics