phpPeanuts  2.2.0
phpPeanuts framework
 All Data Structures Namespaces Files Functions Variables
Functions
depricatedFunctions.php File Reference

Functions

 printDebug ($obj)
 
 arrayCopy (&$anArray)
 
 arrayWith (&$value, $key=0)
 
 array_assocAddAll (&$addTo, $toAdd)
 
 array_addAll (&$addTo, $toAdd)
 
 getBrowser ()
 
 isFalseOrNull ($value)
 
 objectCopy ($obj)
 
 allowUrlInclude ()
 
 pntClone ($obj)
 
 safeClone ($obj)
 
 getOriginalClassName ($class, $warnIfMissing=true)
 
 getPntVersion ()
 
 tryIncludeClass ($className, $dirPath='')
 
 includeClass ($className, $dirPath='', $debug=false)
 
 pntIs_a ($obj, $className)
 
 class_hasMethod ($className, $methodName)
 
 tryIncludeOnce ($filePath)
 
 isBrowserIE ()
 
 is_ofType ($value, $type)
 
 pntToString ($value, $max=4)
 
 pntValueToString ($value)
 
 assocsToStrings ($array, $max=null)
 
 labelFromObject ($value)
 
 labelFrom ($value)
 
 pntPrintBacktrace ($traceArray)
 
 pntGetRelativePath ($path)
 
 pntGetFsSeparator ()
 
 array_searchCaseInsensitive ($needle, $haystack, $strict=false)
 
 is_typeEqual ($first, $second)
 
 getSubstr ($oString, $sString, $eString, $sPos=0)
 
 toCsvString ($array, $separator=';', $qualifier='"')
 
 fromCsvString ($str, $separator=';', $qualifier='"')
 
 splitFilePath ($filePath)
 
 sum_from ($propertyName, &$arr)
 
 stripQueryParam ($url, $paramName)
 
 pntAsInt ($value)
 
 pntGetBaseUrl ($mode=0)
 

Function Documentation

allowUrlInclude ( )

returns wheater url includes are allowed by php

array_addAll ( $addTo,
  $toAdd 
)
array_assocAddAll ( $addTo,
  $toAdd 
)
array_searchCaseInsensitive (   $needle,
  $haystack,
  $strict = false 
)
arrayCopy ( $anArray)

Returns a shallowcopy of the supplied array Assigns primitive types and objects to the new array by value. Arrays are assigned by reference.

Parameters
Array$anArrayArray to be copied
Returns
Array Shallowcopy
arrayWith ( $value,
  $key = 0 
)
Returns
array with a reference to the value as its element. Use the key parameter if supplied
assocsToStrings (   $array,
  $max = null 
)
class_hasMethod (   $className,
  $methodName 
)
fromCsvString (   $str,
  $separator = ';',
  $qualifier = '"' 
)
getBrowser ( )
getOriginalClassName (   $class,
  $warnIfMissing = true 
)

Returns class name in the same case as it was declared in the class definition. Mind the differences with the php4 version:

  • for php5 the first agrument does expect correct case. In php4 this is lower case. In fact both versions expect the result of get_class().
  • the php4 version triggers a warning if the class was never included or not supplied in lower case. The php5 version triggers the warning if the class does not exist.
    Parameters
    string$classthe class name according to the result of get_class()
    boolean$warnIfMissingtrigger a warning if the class does not exist
    Returns
    The class name in proper case
getPntVersion ( )
getSubstr (   $oString,
  $sString,
  $eString,
  $sPos = 0 
)
includeClass (   $className,
  $dirPath = '',
  $debug = false 
)
is_ofType (   $value,
  $type 
)
is_typeEqual (   $first,
  $second 
)
isBrowserIE ( )
isFalseOrNull (   $value)
labelFrom (   $value)
labelFromObject (   $value)
objectCopy (   $obj)

. Use clone. Returns a copy of the object The object's class file must be included by includeClass and the object must support constructing throuhg a zero argument constructor

pntAsInt (   $value)
pntClone (   $obj)

portability wrapper for php5's explicit clone keyword for portability implicit copying should no longer be used. Mind the possible difference in behavior of the versions of this function between php4 and 5: In php5 the clone keyword is used, in php4 an implicit copy is made and then an eventual __clone() method is called on the clone.

Parameters
Object$objthe original object to clone $return Object the clone of the original object
pntGetBaseUrl (   $mode = 0)

WARNING: this function uses $_SERVER directly, which may not be secure

pntGetFsSeparator ( )
pntGetRelativePath (   $path)
pntIs_a (   $obj,
  $className 
)
pntPrintBacktrace (   $traceArray)
pntToString (   $value,
  $max = 4 
)
pntValueToString (   $value)
printDebug (   $obj)

functions from 1.x generalFunctions.php and php5Functions.php Print a variable for debugging. Warning, do not use in production, this function does not properly encode the html, so it may make your site vurnerable to cross site scripting attacks.

safeClone (   $obj)

Alternative portability wrapper that is more reliable (in php4), but slower. Requires the object's class to support construction without parameters.

splitFilePath (   $filePath)
stripQueryParam (   $url,
  $paramName 
)
sum_from (   $propertyName,
$arr 
)
toCsvString (   $array,
  $separator = ';',
  $qualifier = '"' 
)
tryIncludeClass (   $className,
  $dirPath = '' 
)
tryIncludeOnce (   $filePath)