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

Procedural File: kernel_lib.php

Source Location: /kernel/kernel_lib.php



Page Details:



Tags:

version:  $Header$
filesource:  Source Code for this file


Includes:

include_once(UTIL_PKG_PATH.'PHP_Compat/Compat/Function/str_split.php') [line 17]
require_once(KERNEL_PKG_PATH.'array_fill.func.php') [line 13]
some PHP compatability issues need to be dealt with

array_fill







EMAIL_ADDRESS_REGEX [line 357]

EMAIL_ADDRESS_REGEX = '[-a-zA-Z0-9._%+]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}'
html encode all characters taken from: http://www.bbsinc.com/iso8859.html



Tags:

return:  email address $note email regex taken from: http://www.regular-expressions.info/regexbuddy/email.html
access:  public

[ Top ]




array_diff_keys [line 707]

void array_diff_keys( )

array_diff_keys



Tags:

access:  public


[ Top ]



bit_http_request [line 556]

FALSE bit_http_request( string $pUrl, [boolean $pNoCurl = FALSE])

Fetch the contents of a file on a remote host



Tags:

return:  on failure, contents of file on success
access:  public


Parameters

string   $pUrl   url to file to fetch
boolean   $pNoCurl   skip the use of curl if this causes problems
[ Top ]



bit_redirect [line 672]

void bit_redirect( string $pUrl, [ $pStatusCode = HttpStatusCodes::HTTP_FOUND])

Redirect to another page or site



Parameters

string   $pUrl   The url to redirect to
   $pStatusCode  
[ Top ]



bw_is_writeable [line 200]

TRUE bw_is_writeable( array $pPath)

check to see if particular directories are wroteable by bitweaver added check for Windows - wolff_borg - see http://bugs.php.net/bug.php?id=27609



Tags:

return:  on success, FALSE on failure
access:  public


Parameters

array   $pPath   path to file or dir
[ Top ]



chkgd2 [line 895]

void chkgd2( )



Tags:

deprecated:  deprecated since version 2.1.0-beta


[ Top ]



clean_file_path [line 775]

TRUE clean_file_path( array $pPath)

Cleans file path according to system we're on



Tags:

return:  on success, FALSE on failure
access:  public


Parameters

array   $pPath  
[ Top ]



compare_backlinks [line 846]

void compare_backlinks( $ar1, $ar2)



Parameters

   $ar1  
   $ar2  
[ Top ]



compare_changed [line 882]

void compare_changed( $ar1, $ar2)



Parameters

   $ar1  
   $ar2  
[ Top ]



compare_files [line 866]

void compare_files( $ar1, $ar2)



Parameters

   $ar1  
   $ar2  
[ Top ]



compare_images [line 858]

void compare_images( $ar1, $ar2)



Parameters

   $ar1  
   $ar2  
[ Top ]



compare_links [line 842]

void compare_links( $ar1, $ar2)



Parameters

   $ar1  
   $ar2  
[ Top ]



compare_versions [line 874]

void compare_versions( $ar1, $ar2)



Parameters

   $ar1  
   $ar2  
[ Top ]



copy_r [line 524]

void copy_r( array $pSource, array $pTarget)

recursively copy the contents of a directory to a new location akin to copy -r



Tags:

access:  public


Parameters

array   $pSource   source directory
array   $pTarget   target directory
[ Top ]



deprecated [line 292]

void deprecated( [array $pReplace = NULL])

simple function to include in deprecated function calls. makes the developer replace with newer code



Tags:

access:  public


Parameters

array   $pReplace   code that needs replacing
[ Top ]



detoxify [line 235]

void detoxify( &$pParamHash, [boolean $pHtml = FALSE], [boolean $pUrldecode = TRUE], array $pParamHash)

clean up an array of values and remove any dangerous html - particularly useful for cleaning up $_GET and $_REQUEST.

Turn off urldecode when detoxifying $_GET or $_REQUEST - these two are always urldecoded done by PHP itself (check docs). If you urldecode $_GET twice there might be unexpected consequences (like page One%2BTwo --(PHP)--> One+Two --(you)--> One Two).




Tags:

access:  public


Parameters

array   $pParamHash   array to be cleaned
boolean   $pHtml   set true to escape HTML code as well
boolean   $pUrldecode   set true to urldecode as well
   &$pParamHash  
[ Top ]



encode_email_addresses [line 358]

void encode_email_addresses( $pData)



Parameters

   $pData  
[ Top ]



file_get_contents [line 72]

void file_get_contents( $pFile)



Parameters

   $pFile  
[ Top ]



file_name_to_title [line 259]

clean file_name_to_title( string $pFileName)

file_name_to_title



Tags:

return:  file name that can be used as title
access:  public


Parameters

string   $pFileName  
[ Top ]



function_enabled [line 317]

TRUE function_enabled( $pName)

Check that function is enabled on server.



Tags:

return:  if function is enabled on server, FALSE otherwise
access:  public


Parameters

   $pName  
[ Top ]



get_include_contents [line 468]

a get_include_contents( $pFile $pFile)

get_include_contents -- handy function for getting the contents of a php include as a string



Tags:

return:  string with the results of the file


Parameters

$pFile   $pFile   the file to include
[ Top ]



get_temp_dir [line 94]

system get_temp_dir( )

Return system defined temporary directory.

In Unix, this is usually /tmp In Windows, this is usually c:\windows\temp or c:\winnt\temp




Tags:

return:  defined temporary directory.
access:  public


[ Top ]



httpPrefix [line 784]

void httpPrefix( )



[ Top ]



httpScheme [line 780]

void httpScheme( )



[ Top ]



install_error [line 795]

none install_error( [ $pMsg = null], string $)

If an unrecoverable error has occurred, this method should be invoked. script exist occurs



Tags:

return:  this function will DIE DIE DIE!!!
access:  public


Parameters

string   $   pMsg error message to be displayed
   $pMsg  
[ Top ]



is_windows [line 121]

TRUE is_windows( )

is_windows



Tags:

return:  if we are on windows, FALSE otherwise
access:  public


[ Top ]



mb_substr [line 31]

void mb_substr( $str, $start, [ $len = ''], [ $encoding = "UTF-8"])

Check mb_substr availability



Parameters

   $str  
   $start  
   $len  
   $encoding  
[ Top ]



mkdir_p [line 137]

TRUE mkdir_p( array $pTarget, [float $pPerms = 0755])

Recursively create directories



Tags:

return:  on success, FALSE on failure - mErrors will contain reason for failure
access:  public


Parameters

array   $pTarget   target directory
float   $pPerms   octal permissions
[ Top ]



ordinalize [line 749]

void ordinalize( numeric $num)

ordinalize



Tags:

access:  public


Parameters

numeric   $num   Number to append th, st, nd, rd to - only makes sense when languages is english
[ Top ]



parse_xml_attributes [line 630]

TRUE parse_xml_attributes( array $pString)

Parse XML Attributes and return an array

this function has a whopper of a RegEx. I nabbed it from http://www.phpbuilder.com/annotate/message.php3?id=1000234 - XOXO spiderr




Tags:

return:  on success, FALSE on failure
access:  public


Parameters

array   $pString   XML type string of parameters
[ Top ]



pear_check [line 815]

string pear_check( [string $pPearModule = NULL])

pear_check will check to see if a given PEAR module is installed



Tags:

return:  with error message on failure, NULL on success
access:  public


Parameters

string   $pPearModule   The name of the module in the format: Image/GraphViz.php
[ Top ]



r_compare_backlinks [line 854]

void r_compare_backlinks( $ar1, $ar2)



Parameters

   $ar1  
   $ar2  
[ Top ]



r_compare_changed [line 886]

void r_compare_changed( $ar1, $ar2)



Parameters

   $ar1  
   $ar2  
[ Top ]



r_compare_files [line 870]

void r_compare_files( $ar1, $ar2)



Parameters

   $ar1  
   $ar2  
[ Top ]



r_compare_images [line 862]

void r_compare_images( $ar1, $ar2)



Parameters

   $ar1  
   $ar2  
[ Top ]



r_compare_links [line 850]

void r_compare_links( $ar1, $ar2)



Parameters

   $ar1  
   $ar2  
[ Top ]



r_compare_versions [line 878]

void r_compare_versions( $ar1, $ar2)



Parameters

   $ar1  
   $ar2  
[ Top ]



storage_path_to_url [line 280]

a storage_path_to_url( string $pPath)

path_to_url



Tags:

return:  valid url based on the given path
access:  public


Parameters

string   $pPath   Relative path starting in the bitweaver root directory
[ Top ]



tra [line 487]

void tra( string $pString)

Translate a string



Tags:

access:  public


Parameters

string   $pString   String that needs to be translated
[ Top ]



trim_array [line 732]

void trim_array( &$pArray, array $pArray)

trim_array



Tags:

access:  public


Parameters

array   $pArray  
   &$pArray  
[ Top ]



unlink_r [line 500]

TRUE unlink_r( string $pPath, [boolean $pFollowLinks = FALSE])

recursively remove files and directories



Tags:

return:  on success, FALSE on failure
access:  public


Parameters

string   $pPath   directory we want to remove
boolean   $pFollowLinks   follow symlinks or not
[ Top ]



usort_by_title [line 834]

TRUE usort_by_title( array $ar1, array $ar2)

A set of compare functions that can be used in conjunction with usort() type functions



Tags:

return:  on success, FALSE on failure
access:  public


Parameters

array   $ar1  
array   $ar2  
[ Top ]



validate_email_syntax [line 457]

a validate_email_syntax( $pEmail $pEmail)

validate email syntax php include as a string



Tags:

return:  string with the results of the file


Parameters

$pEmail   $pEmail   the file to include
[ Top ]



verify_hex_color [line 330]

void verify_hex_color( $pColor)



Parameters

   $pColor  
[ Top ]



xmlentities [line 652]

TRUE xmlentities( array $string, [array $quote_style = ENT_QUOTES])

XML Entity Mandatory Escape Characters



Tags:

return:  on success, FALSE on failure
access:  public


Parameters

array   $string  
array   $quote_style  
[ Top ]



Documentation generated on Wed, 29 Jul 2015 13:56:45 +0000 by phpDocumentor 1.5.0-lsces