clearFusionCMS 3.0.0
  • Package
  • Class
  • Tree
  • Deprecated

Packages

  • clearFusionCMS
    • module
      • cloudflare
      • comments
      • content
      • forms
      • members
      • search
  • fusionLib
  • None

Classes

  • _flFormGroup
  • _flUtf8Base
  • flAcMgr
  • flApiDbInstaller
  • flApiKeyMgr
  • flApiServer
  • flApiService
  • flApp
  • flAuthTOTP
  • flBufferCode
  • flBufferCss
  • flBufferJs
  • flCache
  • flCacheAPC
  • flCacheDb
  • flCacheDbInstaller
  • flCacheDummy
  • flCacheFile
  • flCacheFunction
  • flCacheMemcache
  • flCacheMemcached
  • flCacheOutput
  • flCacheRedis
  • flCacheSqlite
  • flConfig
  • flConfigDb
  • flConfigDbInstaller
  • flConfigFile
  • flConfigIni
  • flController
  • flControllerAction
  • flDate
  • flDateTzMenu
  • flDb
  • flDbInstaller
  • flDbInstallerInterface
  • flDbMySQL
  • flDbMySQLi
  • flDbMySQLiResult
  • flDbMySQLResult
  • flDbNestedSet
  • flDbResult
  • flDbSQLite
  • flDbSQLite3
  • flDbSQLite3Result
  • flDbSQLiteResult
  • flEmail
  • flEvent
  • flEventDbInstaller
  • flEventManager
  • flExceptionErrorController
  • flExceptionReporter
  • flForm
  • flFormBuilder
  • flFormDecorator
  • flFormDecoratorDl
  • flFormDecoratorDtDd
  • flFormDecoratorFieldset
  • flFormDecoratorForm
  • flFormDecoratorLi
  • flFormDecoratorList
  • flFormDecoratorUl
  • flFormElement
  • flFormElementButton
  • flFormElementCheckbox
  • flFormElementChecklist
  • flFormElementEmail
  • flFormElementFile
  • flFormElementHidden
  • flFormElementImage
  • flFormElementInteger
  • flFormElementNumber
  • flFormElementPane
  • flFormElementPassword
  • flFormElementRadio
  • flFormElementRecaptcha
  • flFormElementSearch
  • flFormElementSelect
  • flFormElementSubmit
  • flFormElementText
  • flFormElementTextArea
  • flFormElementTextSuggest
  • flFormElementUri
  • flFormElementWYSIWYG
  • flFormValidator
  • flFormValidatorAttribMax
  • flFormValidatorAttribMin
  • flFormValidatorCustomJS
  • flFormValidatorEmail
  • flFormValidatorEquals
  • flFormValidatorInteger
  • flFormValidatorMax
  • flFormValidatorMaxChecklist
  • flFormValidatorMaxLength
  • flFormValidatorMin
  • flFormValidatorMinChecklist
  • flFormValidatorMinLength
  • flFormValidatorMultiEmail
  • flFormValidatorNotEquals
  • flFormValidatorNumber
  • flFormValidatorRegex
  • flFormValidatorRequired
  • flFormValidatorSameAs
  • flFormValidatorUri
  • flFtpClient
  • flGravatar
  • flHttpClient
  • flHttpClientCookie
  • flImage
  • flImageFilter
  • flImageFilterBrightness
  • flImageFilterColorize
  • flImageFilterContrast
  • flImageFilterEdgeDetect
  • flImageFilterEmboss
  • flImageFilterGaussianBlur
  • flImageFilterGrayscale
  • flImageFilterMeanRemoval
  • flImageFilterNegative
  • flImageFilterPixelate
  • flImageFilterSelectiveBlur
  • flImageFilterSepia
  • flImageFilterSepia2
  • flImageFilterSmooth
  • flIntegrity
  • flKeygen
  • flLog
  • flLogHandlerChrome
  • flLogHandlerLoggly
  • flLogHandlerPapertrail
  • flLogHandlerSlack
  • flMimeTypes
  • flModuleDbInstaller
  • flModuleMgr
  • flRegistry
  • flRequest
  • flRequestDbInstaller
  • flRequestThrottle
  • flResponse
  • flRouter
  • flRouterRoute
  • flRssChannel
  • flRssClient
  • flRssItem
  • flSearch
  • flSearchIndexer
  • flSearchManager
  • flSearchResults
  • flSearchTags
  • flSession
  • flSessionData
  • flSessionDb
  • flSessionDbInstaller
  • flSessionFile
  • flSessionMemcache
  • flSessionMemcached
  • flSessionRedis
  • flTemplateDbInstaller
  • flTemplateEngine
  • flTemplateManager
  • flTextHTML
  • flTextSplitWords
  • flTextStemmer
  • flTextStemmerEn
  • flTextStrip
  • flTimer
  • flUri
  • flUser
  • flUserAdapter
  • flUserAdapterRemote
  • flUserDbInstaller
  • flUserMgr
  • flUserPwdGen
  • flUserServerApiV1
  • flUtf8
  • flUuid
  • flVariables
  • flVariablesDbInstaller
  • flWidgetBreadcrumb
  • flWidgetFloatingActionMenu
  • flWidgetPagination
  • flWidgetTable
  • flWidgetTabs
  • flWidgetToolbar
  • flWidgetTreeChildNode
  • flWidgetTreeLinkNode
  • flWidgetTreeNode
  • flWidgetTreeView
  • fusionLib

Interfaces

  • flFormElementWYSIWYGCodeInterface
  • flFormElementWYSIWYGInterface
  • flFormElementWYSIWYGTransformInterface
  • flLogHandler
  • flModuleInstallInterface

Exceptions

  • flAcException
  • flAppException
  • flCacheException
  • flConfigException
  • flDateException
  • flDbException
  • flEventException
  • flException
  • flExceptionBadRequest
  • flExceptionForbidden
  • flExceptionLoadClass
  • flExceptionNotFound
  • flExceptionPHP
  • flFormException
  • flHttpClientException
  • flImageException
  • flRegistryException
  • flRequestThrottleException
  • flRouterException
  • flSessionException
  • flTemplateEngineException
  • flUserException
  • flVariablesException
  • flWidgetException

Functions

  • __
  • __noop
  • _flErrorHandler
  • _n
  • _n_noop

Class flRequest

flRequest Class

Class to provide access to request information and aid in the processing of the request.

For mod_rewrite support .htaccess needs to contain:

RewriteEngine on
# RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php
Package: fusionLib
Copyright: Copyright (c) 2007 - 2013 fusionLib. All rights reserved.
Located at system/libs/Request/flRequest.php

Methods summary

public
# __construct( string $uri )

Construct the request object setting the base URI.

Construct the request object setting the base URI.

This is the URI excluding the domain name to the installation, e.g. if not using mod_rewrite and installed at http://www.example.com/testing/index.php then the base URI will be '/testing/index.php'. The same address using mod_rewrite would be http://www.example.com/testing/ therefore the base URI should be set to '/testing/';

Parameters

$uri
The base URI.
protected
# _parseURI( string $uri )

Private function to parse the request URI.

Private function to parse the request URI.

Process the request URI to extract the segments that are the path relative to the install.

Parameters

$uri
The base uri.
public string
# getBaseUri( boolean $absolute = false, boolean $secure = null )

Get the base URI for generating action URIs.

Get the base URI for generating action URIs.

Parameters

$absolute
true to create an absolute URI else false for relative
$secure
tue to use https, false for http or null for as per request.

Returns

string
The URI.
public string
# getBasePath( boolean $absolute = false, boolean $secure = null )

Get the base URI for generating resource URIs.

Get the base URI for generating resource URIs.

Parameters

$absolute
true to create an absolute URI else false for relative
$secure
tue to use https, false for http or null for as per request.

Returns

string
The URI.
public mixed
# getQuery( string $key, mixed $default = null )

Get the value of a query parameter.

Get the value of a query parameter.

Parameters

$key
The parameter to get.
$default
The default value to use if the key is not present.

Returns

mixed
The value assigned to the key or the value of $default.
public string
# getSelf( boolean $absolute = false, boolean $secure = null )

Get the address of the page.

Get the address of the page.

Parameters

$absolute
true to create an absolute URI else false for relative.
$secure
tue to use https, false for http or null for as per request.

Returns

string
The page address.
public boolean
# hasQuery( string $key )

Test if a query parameter is present.

Test if a query parameter is present.

Parameters

$key
The parameter to test.

Returns

boolean
true if the parameter is present else false.
public mixed
# getPost( string $key, mixed $default = null )

Get the value of a post parameter.

Get the value of a post parameter.

Parameters

$key
The parameter to get.
$default
The default value to use if the key is not present.

Returns

mixed
The value assigned to the key or the value of $default.
public boolean
# hasPost( string $key )

Test if a post parameter is present.

Test if a post parameter is present.

Parameters

$key
The parameter to test.

Returns

boolean
true if the parameter is present else false.
public string
# getPutData( )

Get the PUT data.

Get the PUT data.

Returns

string
The data sent via PUT.
public mixed
# getParam( string $key, mixed $default = null )

Get the value of a parameter, checks in the order: internal, $_POST, $_GET

Get the value of a parameter, checks in the order: internal, $_POST, $_GET

Parameters

$key
The parameter to get.
$default
The default value to use if the key is not present.

Returns

mixed
The value assigned to the key or the value of $default.
public array
# getParams( )

Get all the parameters.

Get all the parameters.

Returns

array
Associative array of parameters and their values.
public flRequest
# setParam( string $key, mixed $value )

Set the value of a parameter.

Set the value of a parameter.

Parameters

$key
The parameter to set.
$value
The value to set.

Returns

flRequest
This object.
public boolean
# hasParam( string $key )

Test if a parameter is present.

Test if a parameter is present.

Parameters

$key
The parameter to test.

Returns

boolean
true if the parameter is present else false.
public string
# getCookie( string $key, string $default = null )

Get the value of a cookie.

Get the value of a cookie.

Parameters

$key
The cookie to get.
$default
The default value to return if the cookie isn't available.

Returns

string
The value of the cookie or $default.
public boolean
# hasCookie( string $key )

Test if the cookie exists.

Test if the cookie exists.

Parameters

$key
The cookie to test for.

Returns

boolean
true if the cookie is present else false.
public string
# getServerName( )

Get the name of the server.

Get the name of the server.

This is the name of the virtual server that received the request, this may not be the name of the physical server.

Returns

string
The server name.
public string
# getServerIp( )

Get the IP of the server.

Get the IP of the server.

Returns

string
The server IP.
public string
# getClientIp( )

Get the IP address of the client.

Get the IP address of the client.

Returns

string
The client IP address.
public string
# getUserAgent( )

Get the browsers user agent string.

Get the browsers user agent string.

Returns

string
The user agent string.
public boolean
# isModRewrite( )

Tests if the install is using mod_rewrite.

Tests if the install is using mod_rewrite.

Returns

boolean
true if using mod_rewrite; else false.
public boolean
# isGet( )

Test if GET request.

Test if GET request.

Returns

boolean
true if the request is GET else false.
public boolean
# isPost( )

Test if POST request.

Test if POST request.

Returns

boolean
true if the request is POST else false.
public boolean
# isPut( )

Test if PUT request.

Test if PUT request.

Returns

boolean
true if the request is PUT else false.
public boolean
# isDelete( )

Test if DELETE request.

Test if DELETE request.

Returns

boolean
true if the request is DELETE else false.
public boolean
# isOptions( )

Test if OPTIONS request.

Test if OPTIONS request.

Returns

boolean
true if the request is OPTIONS else false.
public boolean
# isHead( )

Test if HEAD request.

Test if HEAD request.

Returns

boolean
true if the request is HEAD else false.
public boolean
# isSecure( )

Test if the request is over https rather than http.

Test if the request is over https rather than http.

Returns

boolean
true if the request is over HTTPS or false for HTTP.
public boolean
# isXmlHttpRequest( )

Test if the request if via AJAX.

Test if the request if via AJAX.

Returns

boolean
true if AJAX request else false.
public string
# getReferrer( )

Retrieve the referrer string.

Retrieve the referrer string.

Returns

string
The referrer string if any.
public boolean
# isMobile( )

Test if the request came from a mobile device.

Test if the request came from a mobile device.

Returns

boolean
true if the request is from a mobile device; else false.
public boolean
# hasFile( string $name )

Test if the named file has been uploaded.

Test if the named file has been uploaded.

Parameters

$name
The name of the file to test for.

Returns

boolean
true if the file was uploaded or false if the file was not uploaded for any reason.
public integer
# getFileError( string $name )

Get the error if any for an uploaded file.

Get the error if any for an uploaded file.

Parameters

$name
The name of the file to return information for.

Returns

integer
The error code one of flRequest::UPLOAD*
public string
# getTmpFileName( string $name )

Get the temporary file name an uploaded file.

Get the temporary file name an uploaded file.

Parameters

$name
The name of the file to return.

Returns

string
The name of the temporary file or false if the file was not uploaded.
public string
# getFileName( string $name )

Get the file name an uploaded file.

Get the file name an uploaded file.

Parameters

$name
The name of the file to return.

Returns

string
The name of the file or false if the file was not uploaded.
public boolean
# moveUploadedFile( string $name, string $to, string $default = null )

Move the uploaded file to a permanent location.

Move the uploaded file to a permanent location.

Parameters

$name
The name of the uploaded file to move.
$to
The path and name to move the file to.
$default
The file to copy as a default if the named file is not available.

Returns

boolean
true if the file was moved or false if it failed.
public string
# getSegment( integer $num, string $default = null )

Get the segment from the request URI.

Get the segment from the request URI.

Parameters

$num
The zero based index to the segment to return.
$default
The value to return if the segment isn't present.

Returns

string
The requested segment or the default value.
public array
# getSegments( )

Get the array of segments from the request URI.

Get the array of segments from the request URI.

Returns

array
Array of URI segments.

Constants summary

integer UPLOAD_OK

File upload error codes.

File upload error codes.

# 0
integer UPLOADERR_SIZE
# 1
integer UPLOADERR_NOFILE
# 2
integer UPLOADERR_WRITE
# 3
integer UPLOADERR_OTHER
# 4
clearFusionCMS 3.0.0 API documentation generated by ApiGen