boinfolog Class Reference

Inheritance diagram for boinfolog:

sifinfolog vcalinfolog vcalinfolog List of all members.

Detailed Description

This class is the BO-layer of InfoLog, it also handles xmlrpc requests.

Inpackage: infolog

Author:
Ralf Becker <RalfBecker@outdoor-training.de> (c) by Ralf Becker <RalfBecker@outdoor-training.de> http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License


Public Member Functions

int anzSubs (int $info_id)
 Query the number of children / subs.
 boinfolog (int $info_id=0, $instanciate_link=true)
 Constructor Infolog BO.
array cal_to_include ($args)
 hook called be calendar to include events or todos in the cal-dayview
array categories (boolean $complete=False)
 return array with all infolog categories (for xmlrpc)
boolean check_access (int-I-array $info, int $required_rights)
 check's if user has the requiered rights on entry $info_id
 data2xmlrpc (array $data)
 Convert an InfoLog entry into its xmlrpc representation, eg.
boolean delete (int-I-array $info_id, boolean $delete_children=False, int-I-boolean $new_parent=False)
 Delete an infolog entry, evtl.
boolean has_customfields (string $typ)
 checks if there are customfields for typ $typ
 init ()
 init internal data to be empty
boolean link_id2from (array &$info, $not_app='', $not_id='')
 convert a link_id value into an info_from text
array link_query (string $pattern)
 query infolog for entries matching $pattern
string link_title (int-I-array $info)
 get title for an infolog entry identified by $info
array list_methods ($_type='xmlrpc')
 handles introspection or discovery by the logged in client, in which case the input might be an array.
array pm_icons (array $args)
 Returm InfoLog (custom) status icons for projectmanager.
array I boolean & read (int-I-array $info_id, $run_link_id2from=true)
 Read an infolog entry specified by $info_id.
array & search (&$query)
 searches InfoLog for a certain pattern in $query
array search_link (array-I-string $location)
 Hook called by link-class to include infolog in the appregistry of the linkage.
 subject_from_des ($des)
 Create a subject from a description: truncate it and add ' .
int I boolean write (array &$values, $check_defaults=True, $touch_modified=True)
 writes the given $values to InfoLog, a new entry gets created if info_id is not set or 0
 xmlrpc2data (array $data)
 Convert an InfoLog xmlrpc representation into the internal one, eg.

Public Attributes

array $config
 $enums
string $implicit_rights = 'read'
 $link
array $responsible_edit = array('info_status','info_percent','info_datecompleted')
 $send_file_ips = array()
 $so
 $soap_functions
array $timestamps = array('info_startdate','info_enddate','info_datemodified','info_datecompleted')
 $tz_offset = 0
int $tz_offset_s = 0
 it need to be add to a server-time to get the user-time or substracted from a user-time to get the server-time
 $user_time_now
 $valid_pathes = array()
 $vfs
 $vfs_basedir = '/infolog'
 $xmlrpc = False
 $xmlrpc_methods = array()


Constructor & Destructor Documentation

boinfolog::boinfolog int $  info_id = 0,
instanciate_link = true
 

Constructor Infolog BO.

Parameters:
$info_id 
$instanciate_link=true should the link class be instanciated, used by the link-registry to prevent infinit recursion
it need to be add to a server-time to get the user-time or substracted from a user-time to get the server-time


Member Function Documentation

int boinfolog::anzSubs int $  info_id  ) 
 

Query the number of children / subs.

Parameters:
$info_id id
Returns:
number of subs

array boinfolog::cal_to_include args  ) 
 

hook called be calendar to include events or todos in the cal-dayview

Parameters:
$args[year],$args[month],$args[day] date of the events
$args[owner] owner of the events
$args[location] calendar_include_{events|todos}
Returns:
of events (array with keys starttime, endtime, title, view, icon, content)

array boinfolog::categories boolean $  complete = False  ) 
 

return array with all infolog categories (for xmlrpc)

Parameters:
$complete true returns array with all data for each cat, else only the title is returned
Returns:
with cat_id / title or data pairs (see above)

boolean boinfolog::check_access int-I-array $  info,
int $  required_rights
 

check's if user has the requiered rights on entry $info_id

Parameters:
$info data or info_id of infolog entry to check
$required_rights EGW_ACL_{READ|EDIT|ADD|DELETE}
Returns:

boinfolog::data2xmlrpc array $  data  ) 
 

Convert an InfoLog entry into its xmlrpc representation, eg.

convert timestamps to datetime.iso8601

Parameters:
$data infolog entry
xmlrpc infolog entry

boolean boinfolog::delete int-I-array $  info_id,
boolean $  delete_children = False,
int-I-boolean $  new_parent = False
 

Delete an infolog entry, evtl.

incl. it's children / subs

Parameters:
$info_id int id or array with keys 'info_id', 'delete_children' and 'new_parent' setting all 3 params
$delete_children should the children be deleted
$new_parent parent to use for not deleted children if > 0
Returns:
True if delete was successful, False otherwise ($info_id does not exist or no rights)

boolean boinfolog::has_customfields string $  typ  ) 
 

checks if there are customfields for typ $typ

Parameters:
$typ 
Returns:
True if there are customfields for $typ, else False

boinfolog::init  ) 
 

init internal data to be empty

boolean boinfolog::link_id2from array &$  info,
not_app = '',
not_id = ''
 

convert a link_id value into an info_from text

Parameters:
&$info infolog entry, key info_from gets set by this function
$not_app='' app to exclude
$not_id='' id to exclude
Returns:
True if we have a linked item, False otherwise

array boinfolog::link_query string $  pattern  ) 
 

query infolog for entries matching $pattern

Is called as hook to participate in the linking

Parameters:
$pattern pattern to search
Returns:
with info_id - title pairs of the matching entries

string boinfolog::link_title int-I-array $  info  ) 
 

get title for an infolog entry identified by $info

Is called as hook to participate in the linking

Parameters:
$info int info_id or array with infolog entry
Returns:
the title

array boinfolog::list_methods _type = 'xmlrpc'  ) 
 

handles introspection or discovery by the logged in client, in which case the input might be an array.

The server always calls this function to fill the server dispatch map using a string.

Parameters:
$_type='xmlrpc' xmlrpc or soap
Returns:

array boinfolog::pm_icons array $  args  ) 
 

Returm InfoLog (custom) status icons for projectmanager.

Parameters:
$args array with id's in $args['infolog']
Returns:
with id => icon pairs

array I boolean& boinfolog::read int-I-array $  info_id,
run_link_id2from = true
 

Read an infolog entry specified by $info_id.

Parameters:
$info_id integer id or array with key 'info_id' of the entry to read
$run_link_id2from=true should link_id2from run, default yes, need to be set to false if called from link-title to prevent an infinit recursion
Returns:
infolog entry or False if not found or no permission to read it

array& boinfolog::search &$  query  ) 
 

searches InfoLog for a certain pattern in $query

Parameters:
$query[order] column-name to sort after
$query[sort] sort-order DESC or ASC
$query[filter] string with combination of acl-, date- and status-filters, eg. 'own-open-today' or ''
$query[cat_id] category to use or 0 or unset
$query[search] pattern to search, search is done in info_from, info_subject and info_des
$query[action] / $query[action_id] if only entries linked to a specified app/entry show be used
&$query[total] nextmatch-parameters will be used and set if query returns less entries
$query[col_filter] array with column-name - data pairs, data == '' means no filter (!)
Returns:
with id's as key of the matching log-entries

array boinfolog::search_link array-I-string $  location  ) 
 

Hook called by link-class to include infolog in the appregistry of the linkage.

Parameters:
$location location and other parameters (not used)
Returns:
with method-names

boinfolog::subject_from_des des  ) 
 

Create a subject from a description: truncate it and add ' .

..'

int I boolean boinfolog::write array &$  values,
check_defaults = True,
touch_modified = True
 

writes the given $values to InfoLog, a new entry gets created if info_id is not set or 0

checks and asures ACL

Parameters:
&$values values to write, if contains values for check_defaults and touch_modified, they have precedens over the parameters. The
$check_defaults=true check and set certain defaults
$touch_modified=true touch the modification data and sets the modiefier's user-id
Returns:
info_id on a successfull write or false

boinfolog::xmlrpc2data array $  data  ) 
 

Convert an InfoLog xmlrpc representation into the internal one, eg.

convert datetime.iso8601 to timestamps

Parameters:
$data infolog entry
xmlrpc infolog entry


Member Data Documentation

array boinfolog::$config
 

boinfolog::$enums
 

string boinfolog::$implicit_rights = 'read'
 

boinfolog::$link
 

array boinfolog::$responsible_edit = array('info_status','info_percent','info_datecompleted')
 

boinfolog::$send_file_ips = array()
 

boinfolog::$so
 

boinfolog::$soap_functions
 

Initial value:

 array(
                        'read' => array(
                                'in'  => array('int'),
                                'out' => array('array')
                        ),
                        'search' => array(
                                'in'  => array('array'),
                                'out' => array('array')
                        ),
                        'write' => array(
                                'in'  => array('array'),
                                'out' => array()
                        ),
                        'delete' => array(
                                'in'  => array('int'),
                                'out' => array()
                        ),
                        'categories' => array(
                                'in'  => array('bool'),
                                'out' => array('array')
                        ),
                )

array boinfolog::$timestamps = array('info_startdate','info_enddate','info_datemodified','info_datecompleted')
 

boinfolog::$tz_offset = 0
 

int boinfolog::$tz_offset_s = 0
 

it need to be add to a server-time to get the user-time or substracted from a user-time to get the server-time

boinfolog::$user_time_now
 

boinfolog::$valid_pathes = array()
 

boinfolog::$vfs
 

boinfolog::$vfs_basedir = '/infolog'
 

boinfolog::$xmlrpc = False
 

boinfolog::$xmlrpc_methods = array()
 


The documentation for this class was generated from the following file:
Generated on Tue Apr 4 15:46:17 2006 for EgwIcal by  doxygen 1.4.6