com.lokorin.dfcrafters.lib
[ class tree: com.lokorin.dfcrafters.lib ] [ index: com.lokorin.dfcrafters.lib ] [ all elements ]

Procedural File: lib_util.php

Source Location: /_includes/lib_util.php



Page Details:

A library that contains varius functions that do not belong anywhere else and that do not constitute a sufficiently large cohesion group for a library of their own.



Tags:

filesource:  Source Code for this file
license:  GNU Lesser General Public License
version:  $Revision: 1.15 $
author:  Andreas Launila


Includes:

require_once('common.php') [line 20]
For access to common constants and functions.







addQueryParams [line 103]

string addQueryParams( array $paramsToAdd)

Adds specified parameters to the current query string. If a parameter is already specified then the existing value is overwritten by the new one.



Tags:

return:  The resulting query string. It has the form 'foo1=bar1&foo2=bar2'.
access:  public


Parameters

array   $paramsToAdd   The parameters that should be added. The key should be the parameter name, while the value should be the parameter value.
[ Top ]



ensureCssIncluded [line 49]

void ensureCssIncluded( string $cssName)

Ensures that a css file with the specified name is included in the page output. If it is already included then nothing is done, if it is not included then it is added.



Tags:

access:  public


Parameters

string   $cssName   The name of the css file without the .css extension, i.e. 'form' if one wants to ensure that the file in the css dir named 'form.css' is included.
[ Top ]



getCurrentDirectory [line 174]

string getCurrentDirectory( )

Gets the relative path to the current requested directory from the root path.



Tags:

return:  A path from the root path to the current directory.
access:  public


[ Top ]



getCurrentEncodedUrl [line 36]

string getCurrentEncodedUrl( )

Gets the current encoded url, complete with the query string.



Tags:

return:  An encoded url.
access:  public


[ Top ]



getCurrentUrl [line 27]

string getCurrentUrl( )

Gets the current url, complete with the query string.



Tags:

return:  An url.
access:  public


[ Top ]



renameQueryParams [line 82]

string renameQueryParams( array $replacements, [string $queryString = ''])

Renames parameters in a url query string, the values remain unchanged. It can for instance turn "foo=0&bar=hi" into "a=0&b=hi".



Tags:

return:  The query string with the specified name changes performed on it.
access:  public


Parameters

array   $replacements   An array specifying what and how parameters should be renamed. The name of the parameter that should be renamed should be the key and the new name for the parameter should be the value.
string   $queryString   An optional way to specify the query string that should be renamed. The default is that the query string in $_SERVER['QUERY_STRING'] is used.
[ Top ]



sendEmail [line 139]

void sendEmail( string $title, string $message, [string $sender = ''], [string $receiver = 'pylor'])

Sends an email with specified contents. Optionally the receiver of the email can be specififed along with the sender.



Tags:

access:  public


Parameters

string   $title   The title that the email message should have.
string   $message   The actual message contents for the email.
string   $sender   An optional email address that should be given as the sender of the email (and hence the return path).
string   $receiver   An optional specification of the receing email address. It should be given without a domain, i.e. if the mail should be sent to foo@dfcrafters.com then 'foo' should be specified.
[ Top ]



Documentation generated on Tue, 10 Jan 2006 17:06:38 +0100 by phpDocumentor 1.3.0RC4