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

Class: Base_Utility

Source Location: /base_classes/utility.class.php

Class Overview


Project: Welcompose File: utility.class.php


Author(s):

  • Andreas Ahlenstorf

Copyright:

  • 2008 creatics, Olaf Gleba

Variables

Methods



Class Details

[line 25]
Project: Welcompose File: utility.class.php

Copyright (c) 2008 creatics

Project owner: creatics, Olaf Gleba 50939 Köln, Germany http://www.creatics.de

This file is licensed under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE v3 http://www.opensource.org/licenses/agpl-v3.html

$Id: utility.class.php 48 2007-01-19 15:49:28Z andreas $




Tags:

author:  Andreas Ahlenstorf
copyright:  2008 creatics, Olaf Gleba
license:  GNU AFFERO GENERAL PUBLIC LICENSE v3


[ Top ]


Class Variables

$date =  null

[line 39]

Reference to PEAR::Date object



Tags:

access:  public

Type:   object


[ Top ]

$smarty =  null

[line 32]

Reference to Smarty



Tags:

access:  public

Type:   object


[ Top ]

$timezone =  null

[line 46]

Reference to PEAR::Date_Timezone object



Tags:

access:  public

Type:   object


[ Top ]



Class Methods


method loadQuickForm [line 106]

object Instance loadQuickForm( [string $form_name = null], [string $method = 'post'], [string $action = null], [mixed $target = '_self'], [bool $attributes = 'accept-charset=utf-8'], [ $track_submit = false])

Load HTML_QuickForm

Creates new HTML_QuickForm object and returns it. For further details see http://pear.php.net/manual/en/package.html.html-quickform.html-quickform.html-quickform.php




Tags:

return:  of HTML_QuickForm
access:  public


Parameters:

string   $form_name   Form's name
string   $method   Form's method
string   $action   Form's target
mixed   $target   Extra attributes for <form> tag
bool   $attributes   Whether to track if the form was submitted by adding a special hidden field. If the name of such field is not present in the $_GET or $_POST values, the form will be considered as not submitted.
   $track_submit  

[ Top ]

method loadQuickFormSmartyRenderer [line 122]

object Instance loadQuickFormSmartyRenderer( )

Load new HTML_QuickForm Smarty Renderer

Creates new instance of HTML_QuickForm_Renderer_ArraySmarty using the current instance of smarty. If Smarty is not loaded, a Base_UtilityException will be thrown.




Tags:

return:  of HTML_QuickForm_Renderer_ArraySmarty
access:  public


[ Top ]

method loadSmarty [line 60]

void loadSmarty( string $conf)

Smarty Import Function

Function to import Smarty into the base class. This function takes the full path to a smarty config file as first argument. The config file should look (more or less) like Example 2-9 in the Smarty documentation:

http://smarty.php.net/manual/en/installing.smarty.basic.php




Tags:

access:  public


Parameters:

string   $conf   Path to smarty configuration file

[ Top ]

method time [line 162]

string time( string $method, array $params, [string $date = null])

Interface to PEAR::Date

Takes method name as first argument, the method params as second argument. If the third argument is omitted, the actual date/time will be assumed.

For a full list of methods and params see http://pear.php.net/package/Date/docs/latest/Date/Date.html.

$time can be an ISO 8601, TIMESTAMP or UNIXTIME date/time.

Every date passed or generated by PEAR::Date will be converted in the timezone defined by base::_defaults['environment']['timezone']. If base::_defaults['environment']['timezone'] isn't set, empty or contains an unconfigured value, the dates will be converted to UTC.

If you don't like to get a date/time converted to the the configured time zone, use PEAR::Date directly




Tags:

return:  Date/time
throws:  Base_UtilityException
access:  public


Parameters:

string   $method   Method name
array   $params   Method params
string   $date   Date/time

[ Top ]


Documentation generated on Sun, 08 Jan 2012 17:52:06 +0100 by phpDocumentor 1.4.3