public static function run($dataDir = null) { # Instantiate project object $project = new Project($dataDir . 'test_tasks.mpp'); # Create a ChildTasksCollector instance $collector = new ChildTasksCollector(); # Collect all the tasks from RootTask using TaskUtils $taskUtils = new TaskUtils(); $taskUtils->apply($project->getRootTask(), $collector, 0); $tasks = $collector->getTasks(); $tsk = new Tsk(); # Parse through all the collected tasks $i = 0; while ($i < sizeof($tasks)) { $task = $tasks->get($i); if ((string) $task->get($tsk->STOP) == "1/1/2015") { print "NA" . PHP_EOL; } else { print "Task Stop: " . (string) $task->get($tsk->STOP) . PHP_EOL; // . toString() } if ((string) $task->get($tsk->RESUME) == "1/1/2015") { print "NA" . PHP_EOL; } else { print "Task Resume: " . (string) $task->get($tsk->RESUME); // . toString() } print "---------------------------------------------" . PHP_EOL; $i += 1; } }
public static function run($dataDir = null) { # Instantiate project object $project = new Project($dataDir . 'test_tasks.mpp'); # Create a ChildTasksCollector instance $collector = new ChildTasksCollector(); # Collect all the tasks from RootTask using TaskUtils $taskUtils = new TaskUtils(); $taskUtils->apply($project->getRootTask(), $collector, 0); $tsk = new Tsk(); # Parse through all the collected tasks $tasks = $collector->getTasks(); $i = 0; while ($i < sizeof($tasks)) { $task = $tasks->get($i); print $str_ed = $task->get($tsk->IS_EFFORT_DRIVEN) != null ? "EffortDriven" : "Non-EffortDriven" . PHP_EOL; print $str_crit = $task->get($tsk->IS_CRITICAL) != null ? "Critical" : "Non-Critical" . PHP_EOL; $i += 1; } }
public static function get_parent_and_child_tasks($dataDir = null) { # Instantiate project object $project = new Project($dataDir . 'test_tasks.mpp'); # Create a ChildTasksCollector instance $collector = new ChildTasksCollector(); # Collect all the tasks from RootTask using TaskUtils $taskUtils = new TaskUtils(); $taskUtils->apply($project->getRootTask(), $collector, 0); $tsk = new Tsk(); $tasks = $collector->getTasks(); # Parse through all the collected tasks $i = 0; while ($i < sizeof($tasks)) { $task = $tasks->get($i); print "Task Name = " . (string) $task->get($tsk->NAME); //.to_string $i += 1; } }
public static function run($dataDir = null) { # Instantiate project object $project = new Project($dataDir . 'test_tasks.mpp'); # Create a ChildTasksCollector instance $collector = new ChildTasksCollector(); # Collect all the tasks from RootTask using TaskUtils $taskUtils = new TaskUtils(); $taskUtils->apply($project->getRootTask(), $collector, 0); $tasks = $collector->getTasks(); $tsk = new Tsk(); # Parse through all the collected tasks $i = 0; while ($i < sizeof($tasks)) { $task = $tasks->get($i); print "Priority: " . (string) $task->get($tsk->PRIORITY) . PHP_EOL; // . toString() print "---------------------------------------------" . PHP_EOL; $i += 1; } }
public static function get_outline_properties($dataDir = null) { # Instantiate project object $project = new Project($dataDir . 'test_tasks.mpp'); # Create a ChildTasksCollector instance $collector = new ChildTasksCollector(); # Collect all the tasks from RootTask using TaskUtils $taskUtils = new TaskUtils(); $taskUtils->apply($project->getRootTask(), $collector, 0); $tasks = $collector->getTasks(); $tsk = new Tsk(); # Parse through all the collected tasks $i = 0; while ($i < sizeof($tasks)) { $task = $tasks->get($i); print "Outline Level: " . (string) $task->get($tsk->OUTLINE_LEVEL) . PHP_EOL; // . to_string; print "Outline Number: " . (string) $task->get($tsk->OUTLINE_NUMBER) . PHP_EOL; // . to_string; print "---------------------------------------------" . PHP_EOL; $i += 1; } }