Amanu
Projektmanagement für Selbstständige und Freelancer
AmaItem Class Reference

Public Member Functions

 __construct ($id=NULL, $entry=NULL, $client=NULL, $ispreset=false)
 
 get ()
 

Private Member Functions

 calcPrizes ($entry, $client=NULL)
 
 calcTimeFor ($id)
 

Detailed Description

Gets data of an item with a given id and/or does some nice item calculationr egarding price and time, if data is alreaddy present

This file is part of the project codename "AMANUENSIS"

Author
Sebastian Antosch s.ant.nosp@m.osch.nosp@m.@i-sa.nosp@m.n.de

Constructor & Destructor Documentation

__construct (   $id = NULL,
  $entry = NULL,
  $client = NULL,
  $ispreset = false 
)
Parameters
mixed$id- the id of the item to get, if NULL, an $entry must be given
mixed$entry- optional, if no $id is passed, an entry can be passed directly
mixed$client- a client object, needed if we want to calc some prizes
boolean$ispreset- if it is only an item preset
Exceptions
Exception

Member Function Documentation

calcPrizes (   $entry,
  $client = NULL 
)
private
Parameters
$entry- the array representing the item entry
$client- an array with possible hourlyrate and dailyrate to be used if set
Returns
array updated $entry
calcTimeFor (   $id)
private

Calculates the complete time spent on the item

Parameters
$id- the id of the entry
Returns
float decimal time
get ( )

Returns the associative array representing the updated item

Returns
array

The documentation for this class was generated from the following file: