Class Project

Description

A project.

Located in /Project.php (line 41)

Storable
   |
   --StorableTree
      |
      --Project
Direct descendents
Class Description
OldProject
Variable Summary
mixed $eval
mixed $ts
mixed $tts
Method Summary
void children ()
void ETA ()
void ETA_str ([mixed $max = HOURS])
void listTimeEntries ([mixed $bounds = null], [mixed $user = null], [mixed $offset = null], [mixed $count = null])
void next ()
void percentDone ()
void timeSpent ([mixed $bounds = null], [mixed $user = null])
Project top_level ([mixed $customer = null])
void top_level_tree ([array $customer = null], function $callback, bool $favorites_only)
void totalEval ()
void totalTimeSpent ([mixed $bounds = null], [mixed $user = null])
void walk_tree (function $callback, mixed $customer, int $depth, [bool $favorites_only = true])
Variables
Methods
children (line 53)
  • deprecated: replaced by StorableTree::direct_children()
void children ()

Redefined in descendants as:
ETA (line 230)

estimated time remaining

void ETA ()
ETA_str (line 234)
void ETA_str ([mixed $max = HOURS])
isOverEvaluation (line 245)

if we blew the estimates

void isOverEvaluation ()
listTimeEntries (line 61)
  • todo: document
void listTimeEntries ([mixed $bounds = null], [mixed $user = null], [mixed $offset = null], [mixed $count = null])
next (line 45)
void next ()

Redefinition of:
Storable::next()
Load the next row available in this object.
percentDone (line 249)
void percentDone ()
timeSpent (line 215)

the time spent in this project (without subprojects)

  • todo:

    this could probably be optimized using a query similar to:

    1. SELECT SUM( UNIX_TIMESTAMP( `end` ) - UNIX_TIMESTAMP( `start` ) ) AS seconds, project
    2. FROM `timeentry`
    3. GROUP BY project
    4. ORDER BY seconds DESC LIMIT 0 , 30
    a WHERE should of course be added for the bounds and user parameters.

void timeSpent ([mixed $bounds = null], [mixed $user = null])
top_level (line 90)

the toplevel projects for this customer

  • return: the list of toplevel projects for this customer. Toplevel projects are defined as first level leafs in the tree, that is with a LENGTH(path) of KEYLENGTH.
  • todo: security: we addslashes, here, right now. should we not?
Project top_level ([mixed $customer = null])
  • mixed $customer: the customer for which we want the projects. Array or string. defaults to the list of allowed customers
top_level_tree (line 117)

walk the tree of projects for a given customer

void top_level_tree ([array $customer = null], function $callback, bool $favorites_only)
  • function $callback: the name of a function called before descending the into the childs of a node
  • array $customer: the customers to restrict the search to
  • bool $favorites_only
totalEval (line 174)

the evaluation, including subprojects

void totalEval ()
totalTimeSpent (line 190)

the time spent in this project, including subprojects

void totalTimeSpent ([mixed $bounds = null], [mixed $user = null])
walk_tree (line 150)

walk the tree of projects

this will make n requests, where n is the number of childs of the parents given

void walk_tree (function $callback, mixed $customer, int $depth, [bool $favorites_only = true])
  • function $callback: the name of a function called before descending the into the childs of a node
  • mixed $customer: the customers to restrict the search to
  • int $depth: the depth at which we are starting. Defaults to
    1. . Used internally to keep track of the current depth of the tree.
  • bool $favorites_only

Redefined in descendants as:

Inherited Methods

Inherited From StorableTree

StorableTree::direct_children()
StorableTree::dprint_r()
StorableTree::find_empty_slot()
StorableTree::move_subtree()
StorableTree::parent()
StorableTree::save()
StorableTree::set_parent()
StorableTree::subtree()

Inherited From Storable

Storable::Storable()
Storable::backup_data()
Storable::connect()
Storable::count()
Storable::disconnect()
Storable::exists()
Storable::feed_hash()
Storable::get()
Storable::get_data()
Storable::handle_result()
Storable::is_limited()
Storable::next()
Storable::num_rows()
Storable::num_rows_unlimited()
Storable::offset()
Storable::remove()
Storable::save()
Storable::set()
Storable::set_data()
Storable::start_request()
Storable::tablename()
Storable::where_clause()

Documentation generated on Tue, 11 Jan 2005 01:38:25 -0500 by phpDocumentor 1.3.0RC3