Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • PHP
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SIWECOS
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob

Classes

  • cUriBuilderMR
  • ModRewrite
  • ModRewrite_ContentController
  • ModRewrite_ContentExpertController
  • ModRewrite_ContentTestController
  • ModRewrite_ControllerAbstract
  • ModRewriteBase
  • ModRewriteController
  • ModRewriteDebugger
  • ModRewriteTest
  • ModRewriteUrlStack
  • ModRewriteUrlUtil

Functions

  • mr_arrayValue
  • mr_buildGeneratedCode
  • mr_buildNewUrl
  • mr_conCopyArtLang
  • mr_conMoveArticles
  • mr_conSaveArticle
  • mr_conSyncArticle
  • mr_debugOutput
  • mr_getConfiguration
  • mr_getConfigurationFilePath
  • mr_getRequest
  • mr_header
  • mr_i18n
  • mr_loadConfiguration
  • mr_queryAndNextRecord
  • mr_removeMultipleChars
  • mr_requestCleanup
  • mr_runFrontendController
  • mr_setClientLanguageId
  • mr_setConfiguration
  • mr_strCopyCategory
  • mr_strMovedownCategory
  • mr_strMoveSubtree
  • mr_strMoveUpCategory
  • mr_strNewCategory
  • mr_strNewTree
  • mr_strRenameCategory
  • mr_strSyncCategory
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class cUriBuilderMR

Class to build frontend urls for advandced mod rewrite plugin.

Extends abstract Contenido_UriBuilder class and implements the singleton pattern.

Usage:

cInclude('classes', 'uri/class.uriBuilder.MR.php');
$url = 'front_content.php?idart=123';
$mrUriBuilder = cUriBuilderMR::getInstance();
$mrUriBuilder->buildUrl(array($url));
$newUrl = $mrUriBuilder->getUrl();
cUriBuilder
Extended by cUriBuilderMR
Package: Plugin\ModRewrite
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Murat Purc <murat@purc.de>
Todo: add handling of absolute paths
Todo: standardize handling of fragments
Located at classes/uri/class.uribuilder.mr.php
Methods summary
private
# __construct( )

Constructor to create an instance of this class.

Constructor to create an instance of this class.

Tries to set some member variables.

public static cUriBuilderMR
# getInstance( )

Returns a instance of cUriBuilderMR.

Returns a instance of cUriBuilderMR.

Returns

cUriBuilderMR

Throws

cBadMethodCallException
if child class has not implemented this function

Overrides

cUriBuilder::getInstance()
public string
# buildUrl( array $params, boolean $bUseAbsolutePath = false )

Builds a URL based on defined mod rewrite settings.

Builds a URL based on defined mod rewrite settings.

Parameters

$params
array
$params Parameter array, provides only following parameters: <code> $params[0] = 'front_content.php?idart=123...' </code>
$bUseAbsolutePath
boolean
$bUseAbsolutePath [optional] Flag to use absolute path (not used at the moment)

Returns

string
New build url

Throws

cDbException
cException
cInvalidArgumentException
private string
# _buildUrl( array $aParams )

Builds the SEO-URL by analyzing passed arguments (parameter value pairs).

Builds the SEO-URL by analyzing passed arguments (parameter value pairs).

Parameters

$aParams
array
$aParams Parameter array

Returns

string
New build pretty url

Throws

cDbException
cException
cInvalidArgumentException
public static string
# getMultiClientRootDir( string $configuredRootDir )

Returns the defined rootdir.

Returns the defined rootdir.

Allows for root dir being alternativly defined as path of setting client/%frontend_path%.

Parameters

$configuredRootDir
string
$configuredRootDir defined rootdir

Returns

string

Throws

cDbException
cException
cInvalidArgumentException
private string
# _createUrlQueryPart( array $aArgs )

Loops through given parameter array and creates the query part of the URL.

Loops through given parameter array and creates the query part of the URL.

All non CONTENIDO related parameters will be excluded from composition.

Parameters

$aArgs
array
$aArgs associative parameter array

Returns

string
composed query part for the URL like '?foo=bar&param=value'
private mixed
# _getClientParameter( array $aArgs )

Returns client id or name depending on settings.

Returns client id or name depending on settings.

Parameters

$aArgs
array
$aArgs Additional arguments

Returns

mixed
Client id, client name or NULL
private mixed
# _getLanguageParameter( array $aArgs )

Returns language id or name depending on settings.

Returns language id or name depending on settings.

Parameters

$aArgs
array
$aArgs Additional arguments

Returns

mixed
Language id, language name or NULL
private string
# _getPath( array $aPretty )

Returns composed path of url (normally the category structure).

Returns composed path of url (normally the category structure).

Parameters

$aPretty
array
$aPretty Pretty url array

Returns

string
Path
private string
# _getArticleName( array $aPretty, array $aArgs )

Returns articlename depending on current setting.

Returns articlename depending on current setting.

Parameters

$aPretty
array
$aPretty Pretty url array
$aArgs
array
$aArgs Additional arguments

Returns

string
Articlename
Methods inherited from cUriBuilder
getHttpBasePath(), getUrl(), setHttpBasePath()
Properties summary
private static cUriBuilderMR $_instance
#

Self instance

Self instance

private static string $_cachedRootDir
#

Cached rootdir.

Cached rootdir.

The rootdir can differ from the configured one if an alternate frontendpath is configured as client setting. In order to determine the current rootdir only once this is cached as static class member.

private string $_sAmp '&amp;'
#

Ampersand used for composing several parameter value pairs

Ampersand used for composing several parameter value pairs

private boolean $_bIsXHTML false
#

Is XHTML output?

Is XHTML output?

private boolean $_bMREnabled false
#

Is mod rewrite enabled?

Is mod rewrite enabled?

private array $_aMrCfg NULL
#

Mod Rewrite configuration

Mod Rewrite configuration

Properties inherited from cUriBuilder
$sHttpBasePath, $sUrl
CMS CONTENIDO 4.10.1 API documentation generated by ApiGen 2.8.0