PHP Class DmitryDulepov\Realurl\EncodeDecoderBase

Author: Dmitry Dulepov ([email protected])
ファイルを表示 Open project: dmitryd/typo3-realurl Class Usage Examples

Public Properties

Property Type Description
$pageTitleFields array

Protected Properties

Property Type Description
$cache DmitryDulepov\Realurl\Cache\CacheInterface
$configuration DmitryDulepov\Realurl\Configuration\ConfigurationReader
$databaseConnection TYPO3\CMS\Core\Database\DatabaseConnection
$emptySegmentValue string
$ignoredUrlParameters array
$pageRepository TYPO3\CMS\Frontend\Page\PageRepository
$rootPageId integer
$separatorCharacter string Undocumented, unsupported & deprecated.
$tsfe TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController
$utility Utility

Public Methods

Method Description
__construct ( ) Initializes the class.

Protected Methods

Method Description
checkLegacyCondition ( array $conditionConfiguration, string $previousValue ) : boolean Checks conditions for xxxVar.
createQueryStringFromParameters ( array $parameters ) : mixed Creates a query string (without preceeding question mark) from parameters.
getConfigurationForPostVars ( array $configuration, integer $pageId ) : array Sets configuration blocks for fixedPostVars and postVarSets according to priority: current page id first, _DEFAULT last. Also resolves aliases for configuration.
getFromAliasCacheByAliasValue ( array $configuration, string $aliasValue, boolean $onlyNonExpired ) : integer Looks up an ID value (integer) in lookup-table based on input alias value.
getSortedUrl ( string $url ) : string Obtains URL with all query parameters sorted.
initialize ( ) Initializes the instance.
initializeConfiguration ( ) : void Initializes confguration reader.
isInWorkspace ( ) : boolean Checks if system runs in non-live workspace
removeIgnoredParametersFromQueryString ( string $queryString ) : string Removes ignored parameters from the query string.
removeIgnoredParametersFromURL ( string $url ) : string Removes ignored parameters from the URL. Removed parameters are stored in $this->ignoredUrlParameters and can be restored using restoreIgnoredUrlParameters.
restoreIgnoredUrlParameters ( array &$urlParameters ) Restores ignored URL parameters.
restoreIgnoredUrlParametersInURL ( string $url ) : string Restores ignored URL parameters.
sortArrayDeep ( array &$pathParts ) : void Sorts the array deeply.

Method Details

__construct() public method

Initializes the class.
public __construct ( )

checkLegacyCondition() protected method

Checks conditions for xxxVar.
protected checkLegacyCondition ( array $conditionConfiguration, string $previousValue ) : boolean
$conditionConfiguration array
$previousValue string
return boolean

createQueryStringFromParameters() protected method

Creates a query string (without preceeding question mark) from parameters.
protected createQueryStringFromParameters ( array $parameters ) : mixed
$parameters array
return mixed

getConfigurationForPostVars() protected method

Sets configuration blocks for fixedPostVars and postVarSets according to priority: current page id first, _DEFAULT last. Also resolves aliases for configuration.
protected getConfigurationForPostVars ( array $configuration, integer $pageId ) : array
$configuration array
$pageId integer
return array

getFromAliasCacheByAliasValue() protected method

(The lookup table for id<->alias is meant to contain UNIQUE alias strings for id integers) In the lookup table 'tx_realurl_uniqalias' the field "value_alias" should be unique (per combination of field_alias+field_id+tablename)! However the "value_id" field doesn't have to; that is a feature which allows more aliases to point to the same id. The alias selected for converting id to alias will be the first inserted at the moment. This might be more intelligent in the future, having an order column which can be controlled from the backend for instance!
protected getFromAliasCacheByAliasValue ( array $configuration, string $aliasValue, boolean $onlyNonExpired ) : integer
$configuration array
$aliasValue string
$onlyNonExpired boolean
return integer ID integer. If none is found: false

getSortedUrl() protected method

Obtains URL with all query parameters sorted.
protected getSortedUrl ( string $url ) : string
$url string
return string

initialize() protected method

Initializes the instance.
protected initialize ( )

initializeConfiguration() abstract protected method

Initializes confguration reader.
abstract protected initializeConfiguration ( ) : void
return void

isInWorkspace() protected method

Checks if system runs in non-live workspace
protected isInWorkspace ( ) : boolean
return boolean

removeIgnoredParametersFromQueryString() protected method

Removes ignored parameters from the query string.
protected removeIgnoredParametersFromQueryString ( string $queryString ) : string
$queryString string
return string

removeIgnoredParametersFromURL() protected method

Removes ignored parameters from the URL. Removed parameters are stored in $this->ignoredUrlParameters and can be restored using restoreIgnoredUrlParameters.
protected removeIgnoredParametersFromURL ( string $url ) : string
$url string
return string

restoreIgnoredUrlParameters() protected method

Restores ignored URL parameters.
protected restoreIgnoredUrlParameters ( array &$urlParameters )
$urlParameters array

restoreIgnoredUrlParametersInURL() protected method

Restores ignored URL parameters.
protected restoreIgnoredUrlParametersInURL ( string $url ) : string
$url string
return string

sortArrayDeep() protected method

Sorts the array deeply.
protected sortArrayDeep ( array &$pathParts ) : void
$pathParts array
return void

Property Details

$cache protected_oe property

protected CacheInterface,DmitryDulepov\Realurl\Cache $cache
return DmitryDulepov\Realurl\Cache\CacheInterface

$configuration protected_oe property

protected ConfigurationReader,DmitryDulepov\Realurl\Configuration $configuration
return DmitryDulepov\Realurl\Configuration\ConfigurationReader

$databaseConnection protected_oe property

protected DatabaseConnection,TYPO3\CMS\Core\Database $databaseConnection
return TYPO3\CMS\Core\Database\DatabaseConnection

$emptySegmentValue protected_oe property

protected string $emptySegmentValue
return string

$ignoredUrlParameters protected_oe property

protected array $ignoredUrlParameters
return array

$pageRepository protected_oe property

protected PageRepository,TYPO3\CMS\Frontend\Page $pageRepository
return TYPO3\CMS\Frontend\Page\PageRepository

$pageTitleFields public_oe static_oe property

public static array $pageTitleFields
return array

$rootPageId protected_oe property

protected int $rootPageId
return integer

$separatorCharacter protected_oe property

Undocumented, unsupported & deprecated.
protected string $separatorCharacter
return string

$tsfe protected_oe property

protected TypoScriptFrontendController,TYPO3\CMS\Frontend\Controller $tsfe
return TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController

$utility protected_oe property

protected Utility,DmitryDulepov\Realurl $utility
return Utility