tools
[ class tree: tools ] [ index: tools ] [ all elements ]

Class: HtmlFormTools

Source Location: /HtmlFormTools.class.php

Class Overview


Static helper class for all kinds of random functionality.


Author(s):

  • Sebastian Schlapkohl

Version:

  • 1.0

Methods



Class Details

[line 11]
Static helper class for all kinds of random functionality.

Especially houses method-overwrites for utf-8 security in this case.




Tags:

author:  Sebastian Schlapkohl
version:  1.0


[ Top ]


Class Methods


static method array_insert [line 21]

static Array array_insert( $array, uint $index, * $value)

Insert a value into an existing array at a specific index, pushing all following values back.



Tags:

return:  the array with the included value
access:  public


Parameters:

Array   $array   the array to insert the value into
uint   $index   array-index at which to include
*   $value   value to insert at index

[ Top ]

static method auto_htmlspecialchars [line 153]

static String auto_htmlspecialchars( String $string, [Boolean $needsUtf8 = false])

Override-method for htmlspecialchars that handles utf-8-multibyte-security.



Tags:

return:  string with replacements
access:  public


Parameters:

String   $string   string to treat
Boolean   $needsUtf8   determines if utf-8 is active

[ Top ]

static method auto_preg_match [line 125]

static Boolean auto_preg_match( String $pattern, String $string, [Boolean $needsBinarySafety = false])

Override-method for preg_match that handles utf-8-multibyte-security.



Tags:

return:  pattern fits yes/no
access:  public


Parameters:

String   $pattern   regex-pattern to use for match
String   $string   string to match pattern against
Boolean   $needsBinarySafety   determines if utf-8 is active

[ Top ]

static method auto_preg_replace [line 140]

static String auto_preg_replace( String $pattern, String $replacement, String $string, [Boolean $needsBinarySafety = false])

Override-method for preg_replace that handles utf-8-multibyte-security.



Tags:

return:  result with replacements
access:  public


Parameters:

String   $pattern   regex-pattern to use for replacement
String   $replacement   the string to replace the matches
String   $string   the string to search and replace in
Boolean   $needsBinarySafety   determines if utf-8 is active

[ Top ]

static method auto_strlen [line 89]

static uint auto_strlen( String $string, [Boolean $needsBinarySafety = false])

Override-method for strlen that handles utf-8-multibyte-security.



Tags:

return:  length of string
access:  public


Parameters:

String   $string   string to be measured
Boolean   $needsBinarySafety   determines if utf-8 is active

[ Top ]

static method auto_strpos [line 107]

static uint/Boolean auto_strpos( String $haystack, String $needle, [Boolean $needsBinarySafety = false])

Override-method for strpos that handles utf-8-multibyte-security.



Tags:

return:  position of needle or false
access:  public


Parameters:

String   $haystack   string to be used
String   $needle   string to be sought for
Boolean   $needsBinarySafety   determines if utf-8 is active

[ Top ]

static method undoMagicQuotes [line 51]

static String/Array undoMagicQuotes( [String/Array $data = null])

Counteracts the effect of magic quotes if they are activated.



Tags:

return:  cleansed data
access:  public


Parameters:

String/Array   $data   data to remove magic quotes from

[ Top ]


Documentation generated on Fri, 18 Jul 2014 16:32:01 +0200 by phpDocumentor 1.4.3