Functions

XMLParseFile()

XMLParseFile($parser, $file, $store_positions, $cache, $case_folding, $target_encoding, $simplified_xml, $fail_on_non_simplified_xml) 

Parameters

$parser

$file

$store_positions

$cache

$case_folding

$target_encoding

$simplified_xml

$fail_on_non_simplified_xml

This inserts an element into a numerically indexed array at a specific position

array_insert($array, $insert, $position) : bool

Parameters

$array

$insert

$position

Returns

booltrue = success, false = fail (actually, if fails then dies) functionid : # 20110524.1951 note : After Justin Cook (# 20110524.1941) http://www.justin-cook.com/wp/2006/08/02/php-insert-into-an-array-at-a-specific-position note: The original function had the array given as reference '&$array', that caused php exclamation 'Call-time pass-by-reference has been deprecated'. callers : album.html.php

buildBreadcrumbs()

buildBreadcrumbs($bcs) 

Parameters

$bcs

buildPathprefixToWafaili()

buildPathprefixToWafaili() 

buildPgrUserinfo()

buildPgrUserinfo() 

This is a curl solution to check for an image existence before calling getimagesize()

checkRemoteFile($url) : \functionid

Parameters

$url

Returns

\functionid: # 20110516.2141 status : NOT TESTED AT ALL, JUST PUT HERE FOR EVENTUAL LATER USE reference : (# 20110516.2131) Function after http://php.net/manual/de/function.getimagesize.php posted by mycrazydream at 24-Jul-2009 04:00 with the remark: "I had for quite some time been using getimagesize() to check for the existence of a remote image. This turned out to take way too long. The following curl solution only checks the http headers so it is much more efficient." callers :

dump_html_tree()

dump_html_tree($node, $show_attr, $deep) 

Parameters

$node

$show_attr

$deep

This function evaluates the page post event

evaluate_post() : \nothing

Returns

\nothingfunctionid : # 20110507.2121 callers :

This evaluates the pages post information

evaluate_post() : \functionid

Returns

\functionid: # 20110513.1621 callers :

This evaluates the page post event

evaluate_post() : \nothing

Returns

\nothingfunctionid : # 20110507.2121 callers :

This installs an error-handler that turns errors into exceptions to make try/catch available.

exceptions_error_handler($severity, $message, $filename, $lineno) : \nothing

Parameters

$severity

$message

$filename

$lineno

Returns

\nothing- throws an error if php error_reporting is on functionid : # 20110829.1321 # 20110518.2121 # 20110515.1721 status : works reference : http://php.net/manual/de/language.exceptions.php (# 20110829.1322) and http://www.php.net/manual/de/class.errorexception.php (# 20110829.1323) note : Standard php functions do not throw exceptions, so they cannot be wrapped in a try/catch block, but one can extend the error handling. note : (# 20110829.1321 # 20120108.2121) Keep this file synchronous in the following projects: Daftari, Gallery, Dataform2web, ... callers :

file_get_html()

file_get_html($url, $use_include_path, $context, $offset, $maxLen, $lowercase, $forceTagsClosed, $target_charset, $stripRN, $defaultBRText) 

Parameters

$url

$use_include_path

$context

$offset

$maxLen

$lowercase

$forceTagsClosed

$target_charset

$stripRN

$defaultBRText

formattedHtml()

formattedHtml($eleme, $iIndent, $sText) 

Parameters

$eleme

$iIndent

$sText

Set variable name to use as default

from(string $name) : \PHPLinq_Initiator

Parameters

$name

string

Returns

garanteeConfiguration()

garanteeConfiguration() 

garanteeInifile()

garanteeInifile($sFile) 

Parameters

$sFile

This gets the accrurate time as a 'float' in a string

getBcTime() : string

Returns

stringwith accurate time functionid : # 20110526.2251 reference : http://php.net/manual/de/function.microtime.php callers :

This gets the printable duration string for two bctimes

getBcTimespan($sStart, $sStop) : string

Parameters

$sStart

$sStop

Returns

stringThe wanted printable string functionid : # 20110526.2252 callers :

getBreadcrumbs()

getBreadcrumbs() 

This returns an array with folderfamilynames

getDirFamnams($sBasepath) : array

Parameters

$sBasepath

The folder in which to search for folders

Returns

arrayThe array with the foldersfamilynames functionid : # 20110522.1341 todo : This is just a wrapper over getDirFams(), extracting from that the names of a single filefamily. This the quick'n'dirty way to do it. A more performant way were, not to build the complete filefamilies array first and then reduce it, but having the relevant wildcard set already when reading the directory the first time. callers : album.html.php

This makes an array with target-twin-folders to search for buddyfiles

getDirFams($sTargetfolder) : array

Parameters

$sTargetfolder

The folder in which to search for folders

Returns

arrayFalse = error, array = the found foldersfamilies (typically a '*' plus one '*.s' folder) functionid : # 20110427.2221 # 20110521.2321 todo : (# 20120104.2051) If something is wrong with the folder, the page hangs. Some paranoia is wanted to prevent hanging! callers : album.html.php, raw.html.php

This makes an array with target folders to search for buddyfiles

getDirs($sPath) : array

Parameters

$sPath

The folder in which to search for folders

Returns

arrayThe array with the found folders functionid : # 20110427.2221 note : For recursively searching directories compare # 20110102.0121 note : get_buddyfiles() # 20110427.2221 was copied/modified from here callers : album.html.php, raw.html.php

This makes an array with target-twin-folders to search for buddyfiles

getFolderfamilyFromParent($sParentfolder) : array

Parameters

$sParentfolder

Returns

arrayFalse = error, array = folderfamily functionid : # 20110522.1541 callers :

This function returns an eventual foldernameextension

getFoldernameExtension($sFoldername) : string

Parameters

$sFoldername

Returns

stringThe wanted foldername extension so far '' or '.s' functionid : 20110522.1621 callers :

This makes an array with target folders to search for buddyfiles.

get_buddyfiles($sParentFolder) : array

Parameters

$sParentFolder

Returns

arrayThe wanted list of buddyfiles (now including their path relative to the archive base) functionid : # 20110427.222102 # 20110522.1321 note : Version tree (wherefrom copied and modified) - get_dirs() # 20110427.2221 - get_buddyfiles() # 20110427.222102 note : SHIFTED HERE FROM rawfolder.html.php (# 20110509.1311) callers :

get_filefamily

get_filefamily($sBasepath, $sParentFolder, $sFilefamilyname) : array

This function retrieves the filefamily for a given buddyfile

Parameters

$sBasepath

$sParentFolder

Folder to get files, either local drive or url (so far only localdrive)

$sFilefamilyname

The filefamilyname of the files to be listed (e.g. '20110104-1031_n1293')

Returns

arrayArray of array with the foldernameextension and the filesnames of the filefamily functionid : # 20110428.2121 # 20110515.0621 note : (# 20110503.1321) The filefamily has the DISADVANTAGE so far, that it does not contain the folder, only the plainfilenames! Implement entries with relative pathes like in the albums files. callers : only __construct()

This gets the image dimensions by streaming the file until the information is to be read, not downloading the complete image as getimagesize() does

getimagesize_remote($image_url) : \functionid

Parameters

$image_url

Returns

\functionid: # 20110516.2143 status : NOT TESTED AT ALL, JUST PUT HERE FOR EVENTUAL LATER USE reference : (# 20110516.2131) Function after http://php.net/manual/de/function.getimagesize.php posted by djwishbone at hotmail dot com 19-Nov-2003 02:31 with remark: Using remote files with getimagesize($URL) never worked for me. Except when I would grab files from the same server. However, I developed some code with the help from the people here that does work. If you are having problems give this function a shot callers :

This retrieve JPEG width and height without downloading/reading entire image.

getjpegsize($img_loc) : \functionid

Parameters

$img_loc

Returns

\functionid: # 20110516.2142 status : NOT TESTED AT ALL, JUST PUT HERE FOR EVENTUAL LATER USE reference : (# 20110516.2131) Function after http://php.net/manual/de/function.getimagesize.php posted by james dot relyea at zifiniti dot com 08-Feb-2009 04:49 with remark: "As noted below, getimagesize will download the entire image before it checks for the requested information. This is extremely slow on large images that are accessed remotely. Since the width/height is in the first few bytes of the file, there is no need to download the entire file. I wrote a function to get the size of a JPEG by streaming bytes until the proper data is found to report the width and height" callers :

hexToStr()

hexToStr($hex) 

Parameters

$hex

htmlElementEdit()

htmlElementEdit($sHtml, $sTag, $iIndex, $sReplacement, $sMode, $sErr) 

Parameters

$sHtml

$sTag

$iIndex

$sReplacement

$sMode

$sErr

LinqToObjects initiator - Set variable name to use as default

linqfrom(string $name) : \PHPLinq_Initiator

Parameters

$name

string

Returns

mangleFilename

mangleUrlFilename($sFilename, $bForce) : string

This function garantees the file to valid for ...

Parameters

$sFilename

The filename to be mangled. Only 'http://' are mangled.

$bForce

Optional. If set true, the function does not skip strings with 'http://' prefix (because for plain filenames, it cannot discern url and localdrive).

Returns

stringThe mangled filename functionid : # 20110516.2101 note : Check what exatly about urlencode() and rawurlencode() todo : Merge functions # 20110502.1821 mkurl() and # 20110516.2101 mangleFilename() callers : class.obyekt.php readbuddyfile(), readShadowbuddyfile() - the both use a fullfilename

mangleFilename

mangleXmlContent($sText) : string

This function garantees the file to valid for ...

Parameters

$sText

The string to be mangled.

Returns

stringThe mangled string functionid : # 20110523.1441 note : Check what about a php function like urlencode() and rawurlencode() or the like? references : e.g. http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references (# 20110523.1451) callers : class.obyekt.php buildShadowbuddyfile()

This garantees a string to be useful as url.

mkurl($sFile) : string

THIS FUNCTION MAY POSSIBLY REPLACED BY rawurlencode() or urlencode()

Parameters

$sFile

The filename to be mangled

Returns

stringThe mangled filename functionid : # 20110502.1821 note : See - http://www.blooberry.com/indexdot/html/topics/urlencoding.htm#whatwhy (# 20110502.1623) - http://de3.php.net/manual/en/function.filter-var.php (# 20110502.1624) - http://de3.php.net/manual/en/filter.filters.sanitize.php (# 20110502.1625) Only $s = filter_var(sFilename,FILTER_SANITIZE_STRING) did not work as expected. So we retreat provisory to the brute force way. todo : Make it based on PHP's respective function(s) todo: Merge functions # 20110502.1821 mkurl() and # 20110516.2101 mangleFilename() callers : album.html.php, class.obyekt.php, object.html.php

optionsWriteToSeparateInifile()

optionsWriteToSeparateInifile($aPOST) 

Parameters

$aPOST

This homes some preg_split() variations .

preg_split_TEST() : \functionid

.

Returns

\functionid: # 20110518.2021 status : needs be re-tested note : With this lines, we started writing function parse_filename() (# 20110515.2121). Now we ripped it out there and placed them in this dedicated function. For the next use, it probably will have to be re-wired correctly. Anyway, in the debugger, the results shall be visible callers :

This garantees a string to be useful as url after being passe through a form/submit cycle.

rawurlencodex($sIn) : string

Parameters

$sIn

Returns

stringThe encoded string functionid : # 20110524.1931 explanation : We pass filenames via form submit mechanism. In this process, periods are replaced underlines. PHP's rawurlencode does not cover the period (and not the underline and the dash). So we just make our own extension. Interestingly, urldecode() then decodes this correctly without any ado. callers : album.html.php

readIniVar()

readIniVar($sVarname, $sSection, $sFile) 

Parameters

$sVarname

$sSection

$sFile

readbuddyfile

readShadowbuddyfile($sShadowbuddyFullfilename) : array

This reads a shadowbuddyfile into an array

Parameters

$sShadowbuddyFullfilename

This may be a localdrive path or an http path

Returns

arrayor false or empty array - ?The wanted shadowbuddy or error .. CHECK the return details may not be settled yet .. functionid : # 20110514.1821 callers : so far only Obyekt::__construc() note : We make it an independend function, so it can be used by other eventual classes as well. Hm .. not sure this is the optimal decision .. we will see. note : (# 20110510.1821) we started the simplexml experiments after sample from http://www.php.net/manual/de/function.simplexml-load-file.php Only accessing the elements works NOT as described there. E.g. the page talks about an error with foreach, better using a for loop with counter. But crazy is, that the element and attribute values are not acessible as described at all! Solution came with sprintf(), which seems the easiest way to access the text of a node the same seems true for reading the attributes. For us, sprintf() was the ONLY way to get the values.

This makes the array with the album objects.

read_albumobjects($sAlbum) : \functionid

Parameters

$sAlbum

Returns

\functionid: # 20110502.2131 note : Functional similar to # 20110427.2221 get_buddyfiles() in rawfolder.html.php callers :

retrieveBreadcrumbDefinitions()

retrieveBreadcrumbDefinitions() 

retrieve_credentials()

retrieve_credentials() 

sBrick_Breadcrumbs()

sBrick_Breadcrumbs() 

sWafaili_Brick_UserInfo()

sWafaili_Brick_UserInfo() 

strToHex()

strToHex($string) 

Parameters

$string

str_get_html()

str_get_html($str, $lowercase, $forceTagsClosed, $target_charset, $stripRN, $defaultBRText) 

Parameters

$str

$lowercase

$forceTagsClosed

$target_charset

$stripRN

$defaultBRText

writeIniVar()

writeIniVar($sVarname, $sValue, $sSection, $sFile) 

Parameters

$sVarname

$sValue

$sSection

$sFile

xml_parser_character_data_handler()

xml_parser_character_data_handler($parser, $data) 

Parameters

$parser

$data

xml_parser_end_element_handler()

xml_parser_end_element_handler($parser, $name) 

Parameters

$parser

$name

xml_parser_start_element_handler()

xml_parser_start_element_handler($parser, $name, $attrs) 

Parameters

$parser

$name

$attrs

Classes and interfaces

PHPLinq_ILinqProvider

PHPLinq_ILinqProvider

« More »

Album

« More »

Configuration

« More »

DbTxt

« More »

Department

PHPLinq

« More »

DepartmentTable

« More »

Employee

PHPLinq

« More »

EmployeeTable

« More »

Obyekt

« More »

PHPLinq_Adapter_Abstract

PHPLinq_Adapter_Abstract

« More »

PHPLinq_Adapter_Exception

PHPLinq_Adapter_Exception

« More »

PHPLinq_Adapter_Mysqli

PHPLinq_Adapter_Mysqli

« More »

PHPLinq_Adapter_Pdo_Mssql

PHPLinq_Adapter_Pdo_Mssql

« More »

PHPLinq_Adapter_Pdo_Mysql

PHPLinq_Adapter_Pdo_Mysql

« More »

PHPLinq_Adapter_Pdo_Sqlite

PHPLinq_Adapter_Pdo_Sqlite

« More »

PHPLinq_Exception

PHPLinq_Exception

« More »

PHPLinq_Expression

PHPLinq_Expression

« More »

PHPLinq_Function

PHPLinq_Function

« More »

PHPLinq_Initiator

PHPLinq_Initiator

« More »

PHPLinq_LinqToObjects

PHPLinq_LinqToObjects

« More »

PHPLinq_LinqToZendDb

PHPLinq_LinqToZendDb

« More »

PHPLinq_OrderByExpression

PHPLinq_OrderByExpression

« More »

ScriptConst

« More »

Sqlite_Custom

« More »

Webdav

« More »

http_class

« More »

phpsvnclient

PHP SVN CLIENT

« More »

simple_html_dom

simple html dom parser Paperg - in the find routine: allow us to specify that we want case insensitive testing of the value of the selector.

« More »

simple_html_dom_node

simple html dom node PaperG - added ability for "find" routine to lowercase the value of the selector.

« More »

xml2Array

« More »

xml_parser_class

« More »

xml_parser_handler_class

« More »

Constants

 

AUTH_REQUIRED

AUTH_REQUIRED 
 

DEFAULT_BR_TEXT

DEFAULT_BR_TEXT 
 

DEFAULT_TARGET_CHARSET

DEFAULT_TARGET_CHARSET 
 

HDOM_INFO_BEGIN

HDOM_INFO_BEGIN 
 

HDOM_INFO_END

HDOM_INFO_END 
 

HDOM_INFO_ENDSPACE

HDOM_INFO_ENDSPACE 
 

HDOM_INFO_INNER

HDOM_INFO_INNER 
 

HDOM_INFO_OUTER

HDOM_INFO_OUTER 
 

HDOM_INFO_QUOTE

HDOM_INFO_QUOTE 
 

HDOM_INFO_SPACE

HDOM_INFO_SPACE 
 

HDOM_INFO_TEXT

HDOM_INFO_TEXT 
 

HDOM_QUOTE_DOUBLE

HDOM_QUOTE_DOUBLE 
 

HDOM_QUOTE_NO

HDOM_QUOTE_NO 
 

HDOM_QUOTE_SINGLE

HDOM_QUOTE_SINGLE 
 

HDOM_TYPE_COMMENT

HDOM_TYPE_COMMENT 
 

HDOM_TYPE_ELEMENT

HDOM_TYPE_ELEMENT 
 

HDOM_TYPE_ENDTAG

HDOM_TYPE_ENDTAG 
 

HDOM_TYPE_ROOT

HDOM_TYPE_ROOT 
 

HDOM_TYPE_TEXT

HDOM_TYPE_TEXT 
 

HDOM_TYPE_UNKNOWN

HDOM_TYPE_UNKNOWN 
 

NOT_FOUND

NOT_FOUND 
 

NO_ERROR

NO_ERROR 
 

PHPSVN_DIR

PHPSVN_DIR 
 

PHPSVN_LOGS_REQUEST

PHPSVN_LOGS_REQUEST 
 

PHPSVN_NORMAL_REQUEST

PHPSVN_NORMAL_REQUEST 
 

PHPSVN_VERSION_REQUEST

PHPSVN_VERSION_REQUEST 
 

SVN_FILE

SVN_FILE 
 

SVN_FILE_ID

SVN_FILE_ID 
 

SVN_IN_FILE

SVN_IN_FILE 
 

SVN_LAST_MODIFIED

SVN_LAST_MODIFIED 
 

SVN_LOGS_ADDED_FILES

SVN_LOGS_ADDED_FILES 
 

SVN_LOGS_AUTHOR

SVN_LOGS_AUTHOR 
 

SVN_LOGS_BEGINGS

SVN_LOGS_BEGINGS 
 

SVN_LOGS_COMMENT

SVN_LOGS_COMMENT 
 

SVN_LOGS_DATE

SVN_LOGS_DATE 
 

SVN_LOGS_DELETED_FILES

SVN_LOGS_DELETED_FILES 
 

SVN_LOGS_MODIFIED_FILES

SVN_LOGS_MODIFIED_FILES 
 

SVN_LOGS_RENAMED_FILES

SVN_LOGS_RENAMED_FILES 
 

SVN_LOGS_VERSION

SVN_LOGS_VERSION 
 

SVN_RELATIVE_URL

SVN_RELATIVE_URL 
 

SVN_STATUS

SVN_STATUS 
 

SVN_URL

SVN_URL 
 

UNKNOWN_ERROR

UNKNOWN_ERROR