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
    • ContentRssCreator
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SearchSolr
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob
  • Smarty
    • Cacher
    • Compiler
    • Config
    • Debug
    • PluginsBlock
    • PluginsFilter
    • PluginsFunction
    • PluginsInternal
    • PluginsModifier
    • PluginsModifierCompiler
    • PluginsShared
    • Security
    • Template
    • TemplateResources
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Transport

Classes

  • cUri
  • cUriBuilder
  • cUriBuilderConfig
  • cUriBuilderCustom
  • cUriBuilderCustomPath
  • cUriBuilderFactory
  • cUriBuilderFrontcontent

Interfaces

  • NotInitializedException
  • Overview
  • Package
  • Class
  • Todo
  • Download

Class cUri

Frontend URL creation. Works as a wrapper of an UriBuilder instance.

Package: Core\Frontend\URI
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Murat Purc
Located at classes/uri/class.uri.php
Methods summary
private
# __construct( )

Constructor of cUri. Is not callable from outside. Gets the UriBuilder configuration and creates an UriBuilder instance.

Constructor of cUri. Is not callable from outside. Gets the UriBuilder configuration and creates an UriBuilder instance.

public static cUri
# getInstance( )

Returns self instance

Returns self instance

Returns

cUri
public string
# build( mixed $param, boolean $bUseAbsolutePath = false, array $aConfig = array() )

Creates a URL to frontend page.

Creates a URL to frontend page.

Parameters

$param

Either url or assoziative array containing parameter: - url: front_content.php?idcat=12&lang=1 - params: array('idcat' => 12, 'lang' => 1) Required values depend on used UriBuilder, but a must have is 'lang'.

$bUseAbsolutePath
Flag to create absolute Urls
$aConfig
If not set, cUriBuilderConfig::getConfig() will be used by the UriBuilder

Returns

string
The Url build by cUriBuilder

Throws

cInvalidArgumentException
if the given params do not contain the lang
public string
# buildRedirect( mixed $param, array $aConfig = array() )

Creates a URL used to redirect to frontend page.

Creates a URL used to redirect to frontend page.

Parameters

$param

Either url or assoziative array containing parameter: - url: front_content.php?idcat=12&lang=1 - params: array('idcat' => 12, 'lang' => 1) Required values depend on used UriBuilder, but a must have is 'lang'.

$aConfig
If not set, cUriBuilderConfig::getConfig() will be used by the UriBuilder

Returns

string
The redirect Url build by cUriBuilder
public array
# parse( string $sUrl )

Splits passed url into its components

Splits passed url into its components

Parameters

$sUrl
The Url to strip down

Returns

array

Assoziative array created by using parse_url() having the key 'params' which includes the parameter value pairs.

public string
# composeByComponents( array $aComponents )

Composes a url using passed components array

Composes a url using passed components array

Parameters

$aComponents
Assoziative array created by parse_url()

Returns

string
$sUrl The composed Url
public boolean
# isExternalUrl( string $sUrl )

Checks, if passed url is an external url while performing hostname check

Checks, if passed url is an external url while performing hostname check

Parameters

$sUrl
Url to check

Returns

boolean
True if url is a external url, otherwhise false
public boolean
# isIdentifiableFrontContentUrl( string $sUrl )

Checks, if passed url is an identifiable internal url.

Checks, if passed url is an identifiable internal url.

Following urls will be identified as a internal url: - "/", "/?idart=123", "/?idcat=123", ... - "front_content.php", "front_content.php?idart=123", "front_content.php?idcat=123", ... - "/front_content.php", "/front_content.php?idart=123", "/front_content.php?idcat=123", ... - The path component of an client HTML base path: e. g. "/cms/", "/cms/?idart=123", "/cms/?idcat=123" - Also possible: "/cms/front_content.php", "/cms/front_content.php?idart=123", "/cms/front_content.php?idcat=123" All of them prefixed with protocol and client host (e. g. http://host/) will also be identified as a internal Url.

Other Urls, even internal Urls like /unknown/path/to/some/page.html will not be identified as internal url event if they are real working clean URLs.

Parameters

$sUrl
Url to check

Returns

boolean
True if url is identifiable internal url, otherwhise false
public cUriBuilder
# getUriBuilder( )

Returns UriBuilder instance.

Returns UriBuilder instance.

Returns

cUriBuilder
Properties summary
private static cUri $_instance

Self instance.

Self instance.

#
private cUriBuilder $_oUriBuilder

UriBuilder instance.

UriBuilder instance.

#
private string $_sUriBuilderName

UriBuilder name.

UriBuilder name.

#
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen