/system/functions.php

Description
Constants
_mbstringloaded_ = true (line 18)
Functions
bytesToString (line 443)

Makes out of a byte number a human readable string

string bytesToString (int $intBytes, [bool $bitPhpIni = false])
  • int $intBytes
  • bool $bitPhpIni: (Value ends with M/K/B)
checkConditionalGetHeaders (line 1230)

Checks, if the browser sent the same checksum as provided. If so, a http 304 is sent to the browser

bool checkConditionalGetHeaders (string $strChecksum)
  • string $strChecksum
checkEmailaddress (line 924)

Validates if the passed string is a valid mail-address

bool checkEmailaddress (string $strAddress)
  • string $strAddress
checkFolder (line 949)

Validates, if the passed Param represents a valid folder in the filesystem

bool checkFolder (string $strPath)
  • string $strPath
checkNumber (line 938)

Validates, if the passed value is numeric

bool checkNumber (int $intNumber)
  • int $intNumber
checkText (line 965)

Checks the length of a passed string

bool checkText (string $strText, [int $intMin = 1], [int $intMax = 0])
  • string $strText
  • int $intMin
  • int $intMax
createFilename (line 861)

Creates a filename valid for filesystems

string createFilename (string $strName, [bool $bitFolder = false])
  • string $strName
  • bool $bitFolder
dateToString (line 491)

Converts a dateobject to a readable string

string dateToString (class_date $objDate, [bool $bitLong = true])
dbsafeString (line 1027)

Wrapper to dbSafeString of class_db

  • see: class_db::dbSafeString($strString, $bitHtmlEntities = true)
string dbsafeString (string $strString, [string $bitHtmlEntities = true])
  • string $strString
  • string $bitHtmlEntities: escape html-entities?
generateSystemid (line 985)

Generates a new SystemID

  • return: The new SystemID
string generateSystemid ()
getAllPassedParams (line 125)

Returns all params passed during startup by get, post or files

array getAllPassedParams ()
getArrayFiles (line 53)

Returns the complete FILE-Array

mixed getArrayFiles ()
getArrayGet (line 44)

Returns the complete GET-Array

mixed getArrayGet ()
getArrayPost (line 89)

Returns the complete POST-array

mixed getArrayPost ()
getCookie (line 159)

Provides acces to the $_COOKIE Array.

NOTE: Use the cookie-class to get data from cookies!

mixed getCookie (string $strKey)
  • string $strKey
getGet (line 32)

Returns a value from the GET-array

string getGet (string $strKey)
  • string $strKey
getImageAdmin (line 391)

Returns an image-tag with surrounding tooltip

  • todo: move to toolkit
string getImageAdmin (string $strImage, [string $strAlt = ""], [bool $bitNoAlt = false], [ $strId = ""])
  • string $strImage
  • string $strAlt
  • bool $bitNoAlt
  • $strId
getLinkAdmin (line 212)

Generates a link for the admin-area

string getLinkAdmin (string $strModule, string $strAction, [string $strParams = ""], [string $strText = ""], [string $strAlt = ""], [string $strImage = ""], [bool $bitTooltip = true], [string $strCss = ""])
  • string $strModule
  • string $strAction
  • string $strParams
  • string $strText
  • string $strAlt
  • string $strImage
  • bool $bitTooltip
  • string $strCss
getLinkAdminHref (line 240)

Generates a link for the admin-area

string getLinkAdminHref (string $strModule, [string $strAction = ""], [string $strParams = ""])
  • string $strModule
  • string $strAction
  • string $strParams
getLinkAdminManual (line 181)

Generates a link using the content passed.

The param $strLinkContent should contain all contents of the a-tag. The system renders <a $strLinkContent title... class...>($strText|$strImage)</a>

string getLinkAdminManual (string $strLinkContent, string $strText, [string $strAlt = &quot;&quot;], [string $strImage = &quot;&quot;], [string $strImageId = &quot;&quot;], [string $strLinkId = &quot;&quot;], [bool $bitTooltip = true], [string $strCss = &quot;&quot;])
  • string $strLinkContent
  • string $strText
  • string $strAlt
  • string $strImage
  • string $strImageId
  • string $strLinkId
  • bool $bitTooltip
  • string $strCss
getLinkAdminPopup (line 336)

Generates a link opening in a popup in admin-area

string getLinkAdminPopup (string $strModule, string $strAction, [string $strParams = &quot;&quot;], [string $strText = &quot;&quot;], [string $strAlt = &quot;&quot;], [string $strImage = &quot;&quot;], [int $intWidth = &quot;500&quot;], [int $intHeight = &quot;500&quot;], [string $strTitle = &quot;&quot;], [bool $bitTooltip = true], [bool $bitPortalEditor = false])
  • string $strModule
  • string $strAction
  • string $strParams
  • string $strText
  • string $strAlt
  • string $strImage
  • int $intWidth
  • int $intHeight
  • string $strTitle
  • bool $bitTooltip
  • bool $bitPortalEditor
getLinkAdminRaw (line 302)

Generats a raw link in admin-area.

Can be used to create links to external resources. no admin=1 and so on is added.

string getLinkAdminRaw ( $strParams, [string $strText = &quot;&quot;], [string $strAlt = &quot;&quot;], [string $strImage = &quot;&quot;], [string $strTarget = &quot;_self&quot;], string $strParames)
  • string $strParames
  • string $strText
  • string $strAlt
  • string $strImage
  • string $strTarget
  • $strParams
getLinkPortal (line 545)

Creates a Link for the portal

string getLinkPortal (string $strPageI, string $strPageE, [string $strTarget = &quot;_self&quot;], [string $strText = &quot;&quot;], [string $strAction = &quot;&quot;], [string $strParams = &quot;&quot;], [string $strSystemid = &quot;&quot;], [string $strCssClass = &quot;&quot;], [string $strLanguage = &quot;&quot;], [string $strSeoAddon = &quot;&quot;])
  • string $strPageI
  • string $strPageE
  • string $strTarget
  • string $strText
  • string $strAction
  • string $strParams
  • string $strSystemid
  • string $strCssClass
  • string $strLanguage
  • string $strSeoAddon
getLinkPortalHref (line 570)

Creates a raw Link for the portal (just the href)

string getLinkPortalHref (string $strPageI, [string $strPageE = &quot;&quot;], [string $strAction = &quot;&quot;], [string $strParams = &quot;&quot;], [string $strSystemid = &quot;&quot;], [string $strLanguage = &quot;&quot;], [string $strSeoAddon = &quot;&quot;])
  • string $strPageI
  • string $strPageE
  • string $strAction
  • string $strParams
  • string $strSystemid
  • string $strLanguage
  • string $strSeoAddon: Only used if using mod_rewrite
getLinkPortalPopup (line 686)

Generates a link opening in a popup in portal-area

string getLinkPortalPopup (string $strPageI, string $strPageE, [string $strAction = &quot;&quot;], [string $strParams = &quot;&quot;], [string $strSystemid = &quot;&quot;], [string $strTitle = &quot;&quot;], [int $intWidth = &quot;500&quot;], [int $intHeight = &quot;500&quot;])
  • string $strPageI
  • string $strPageE
  • string $strAction
  • string $strParams
  • string $strSystemid
  • string $strTitle
  • int $intWidth
  • int $intHeight
getNoticeAdminWithoutAhref (line 378)

Generates a tooltip for an image, but doesn't generate a a-tag surrounding the image Located in functions.php since used by the portaleditor

  • todo: combine with getImageAdmin()?
string getNoticeAdminWithoutAhref (string $strText, string $strImage)
  • string $strText
  • string $strImage
getPost (line 77)

Returns a value from the Post-array

string getPost (string $strKey)
  • string $strKey
getRightsImageAdminName (line 403)

Determins the rights-filename of a system-record. Looks up if the record uses its' own rights or inherits the rights from another record.

  • todo: move to toolkit
string getRightsImageAdminName (string $strSystemid)
  • string $strSystemid
getServer (line 113)

Returns a value from the SERVER-Array

unknown getServer (mixed $strKey)
  • mixed $strKey
hex2rgb (line 519)

Converts a hex-string to its rgb-values

array hex2rgb (string $color)
  • string $color
htmlStripTags (line 762)

Wrapper to phps strip_tags Removes all html and php tags in a string

string htmlStripTags (string $strHtml, [string $strAllowTags = &quot;&quot;])
  • string $strHtml
  • string $strAllowTags
htmlToString (line 721)

Changes HTML to simple printable strings

string htmlToString (string $strHtml, [bool $bitEntities = false], [bool $bitEscapeCrlf = true])
  • string $strHtml
  • bool $bitEntities
  • bool $bitEscapeCrlf
issetCookie (line 148)

Tests, if the requested cookie exists

bool issetCookie (string $strKey)
  • string $strKey
issetGet (line 64)

Checks whether a kay exists in GET-array, or not

bool issetGet (string $strKey)
  • string $strKey
issetPost (line 100)

Looks, if a key is in POST-array or not

bool issetPost (string $strKey)
  • string $strKey
issetServer (line 135)

Key in SERVER-Array?

bool issetServer (string $strKey)
  • string $strKey
phpSizeToBytes (line 417)

Converts a php size string (e.g. "4M") into bytes

int phpSizeToBytes (int $strBytes)
  • int $strBytes
processWysiwygHtmlContent (line 781)

This function does a few cleanups and optimizations on HTML content generated via the WYSIWYG editor.

Should be used everytime before HTML content generated via the WYSIWYG editor is going to be saved. E.g. it replaces absolute URLs with dynamic _webpath_ and synchronizes the width/height style-values set by WYSIWYG editor for on-the-fly images (starting with image.php?image=...)

For example: <img src="http://www.mydomain.com/image.php?image=/portal/pics/myimage.jpg&maxHeight=200" style="width: 100px; height: 100px" /> becomes <img src="_webpath_/image.php?image=/portal/pics/myimage.jpg&maxHeight=100" style="width: 100px; height: 100px" />

string processWysiwygHtmlContent (string $strHtmlContent)
  • string $strHtmlContent
removeDirectoryTraversals (line 849)

Removes traversals like ../ from the passed string

string removeDirectoryTraversals (string $strFilename)
  • string $strFilename
saveUrlEncode (line 813)
  • deprecated: Doesn't make that much sense?!
  • todo: please check if needed, maybe remove method Encodes an url to be more safe but being less strict than urlencode()
string saveUrlEncode (string $strText)
  • string $strText
sendConditionalGetHeaders (line 1216)

Sends headers to the client, to allow conditionalGets

void sendConditionalGetHeaders (string $strChecksum)
  • string $strChecksum: Checksum of the content. Must be unique for one state.
splitUpLink (line 702)

Splits up a html-link into its parts, such as link, name, href

array splitUpLink (string $strLink)
  • string $strLink
timeToString (line 473)

Changes a timestamp to a readable string

string timeToString (int $intTime, [bool $bitLong = true])
  • int $intTime
  • bool $bitLong
uniEreg (line 1162)

Wrapper to phps ereg

int uniEreg (string $strPattern, string $strString)
  • string $strPattern
  • string $strString
uniStripos (line 1086)

Wrapper to phps stripos

int uniStripos (string $strHaystack, string $strNeedle)
  • string $strHaystack
  • string $strNeedle
uniStrlen (line 1099)

Wrapper to phps strlen

int uniStrlen (string $strString)
  • string $strString
uniStrpos (line 1056)

Wrapper to phps strpos

int uniStrpos (string $strHaystack, string $strNeedle)
  • string $strHaystack
  • string $strNeedle
uniStrReplace (line 1177)

Unicode-safe wrapper to strReplace

  • deprecated: str_replace is utf8-aware!
void uniStrReplace (mixed $mixedSearch, mixed $mixedReplace, string $strSubject, [ $bitUnicodesafe = false])
  • mixed $mixedSearch: array or string
  • mixed $mixedReplace: array or string
  • string $strSubject
  • $bitUnicodesafe
uniStrrpos (line 1072)

Wrapper to phps strrpos

int uniStrrpos (string $strHaystack, string $strNeedle)
  • string $strHaystack
  • string $strNeedle
uniStrtolower (line 1112)

Wrapper to phps strtolower, due to problems with UTF-8 on some configurations

string uniStrtolower (string $strString)
  • string $strString
uniStrtoupper (line 1125)

Wrapper to phps strtoupper, due to problems with UTF-8 on some configurations

string uniStrtoupper (string $strString)
  • string $strString
uniStrTrim (line 1202)

Unicode-safe string trimmer

string uniStrTrim (string $strString, int $intLength, [string $strAdd = &quot;...&quot;])
  • string $strString: string to wrap
  • int $intLength
  • string $strAdd: string to add after wrapped string
uniSubstr (line 1140)

Wrapper to phps substr

string uniSubstr (string $strString, int $intStart, [int $intEnd = &quot;&quot;])
  • string $strString
  • int $intStart
  • int $intEnd
urlSafeString (line 826)

Replaces some special characters with url-safe characters and removes any other special characters.

Should be used whenever a string is placed into an URL

string urlSafeString (string $strText)
  • string $strText
validateSystemid (line 1009)

Checks a systemid for the correct syntax

bool validateSystemid ( $strID, string $strtID)
  • string $strtID
  • $strID
xmlSafeString (line 1037)

Makes a string safe for xml-outputs

string xmlSafeString (string $strString)
  • string $strString

Documentation generated on Mon, 12 Apr 2010 21:21:53 +0200 by phpDocumentor 1.4.3