![Page 1: PhpProject Documentation - Read the Docs · PDF filePhpProject Documentation, Release 0.12.0 |PHPProject| PHPProject is a library written in pure PHP that provides a set of classes](https://reader031.vdocument.in/reader031/viewer/2022021509/5aa0adde7f8b9a84178e8a83/html5/thumbnails/1.jpg)
PhpProject DocumentationRelease 0.12.0
The PhpProject Team
August 13, 2014
![Page 2: PhpProject Documentation - Read the Docs · PDF filePhpProject Documentation, Release 0.12.0 |PHPProject| PHPProject is a library written in pure PHP that provides a set of classes](https://reader031.vdocument.in/reader031/viewer/2022021509/5aa0adde7f8b9a84178e8a83/html5/thumbnails/2.jpg)
![Page 3: PhpProject Documentation - Read the Docs · PDF filePhpProject Documentation, Release 0.12.0 |PHPProject| PHPProject is a library written in pure PHP that provides a set of classes](https://reader031.vdocument.in/reader031/viewer/2022021509/5aa0adde7f8b9a84178e8a83/html5/thumbnails/3.jpg)
Contents
1 Introduction 31.1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2 File formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.3 Contributing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 Installing/configuring 52.1 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.2 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.3 Using samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3 General usage 73.1 Basic example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73.2 Document information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4 Task 94.1 Allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5 Resource 11
6 Recipes 136.1 Title . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
7 Frequently asked questions 15
8 Credits 17
9 References 199.1 GanttProject (GAN) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199.2 MSProjectExchange (MPX) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
10 Indices and tables 21
i
![Page 4: PhpProject Documentation - Read the Docs · PDF filePhpProject Documentation, Release 0.12.0 |PHPProject| PHPProject is a library written in pure PHP that provides a set of classes](https://reader031.vdocument.in/reader031/viewer/2022021509/5aa0adde7f8b9a84178e8a83/html5/thumbnails/4.jpg)
ii
![Page 5: PhpProject Documentation - Read the Docs · PDF filePhpProject Documentation, Release 0.12.0 |PHPProject| PHPProject is a library written in pure PHP that provides a set of classes](https://reader031.vdocument.in/reader031/viewer/2022021509/5aa0adde7f8b9a84178e8a83/html5/thumbnails/5.jpg)
PhpProject Documentation, Release 0.12.0
|PHPProject|
PHPProject is a library written in pure PHP that provides a set of classes to write to different project managements fileformats, i.e. GanttProject (.gan) and MS-Project (.mpx). PHPProject is an open source project licensed under LGPL.
Contents 1
![Page 6: PhpProject Documentation - Read the Docs · PDF filePhpProject Documentation, Release 0.12.0 |PHPProject| PHPProject is a library written in pure PHP that provides a set of classes](https://reader031.vdocument.in/reader031/viewer/2022021509/5aa0adde7f8b9a84178e8a83/html5/thumbnails/6.jpg)
PhpProject Documentation, Release 0.12.0
2 Contents
![Page 7: PhpProject Documentation - Read the Docs · PDF filePhpProject Documentation, Release 0.12.0 |PHPProject| PHPProject is a library written in pure PHP that provides a set of classes](https://reader031.vdocument.in/reader031/viewer/2022021509/5aa0adde7f8b9a84178e8a83/html5/thumbnails/7.jpg)
CHAPTER 1
Introduction
PHPProject is a library written in pure PHP that provides a set of classes to write to different project managementfile formats, i.e. Microsoft MSProjectExchange <http://support.microsoft.com/kb/270139> (.mpx) and GanttProject(.gan).
PHPProject is an open source project licensed under the terms of LGPL version 3. PHPProject is aimed to be ahigh quality software product by incorporating continuous integration and unit testing. You can learn more aboutPHPProject by reading this Developers’ Documentation and the API Documentation.
1.1 Features
• Create an in-memory project management representation
• Set file meta data (author, title, description, etc)
• Add resources from scratch or from existing one
• Add tasks from scratch or from existing one
• Output to different file formats: MSProjectExchange (.mpx), GanttProject (.gan)
• ... and lots of other things!
1.2 File formats
Below are the supported features for each file formats.
1.2.1 Writers
Features MPX GANDocument Properties Standard
CustomDocument InformationsProject Task
ResourceAllocation
3
![Page 8: PhpProject Documentation - Read the Docs · PDF filePhpProject Documentation, Release 0.12.0 |PHPProject| PHPProject is a library written in pure PHP that provides a set of classes](https://reader031.vdocument.in/reader031/viewer/2022021509/5aa0adde7f8b9a84178e8a83/html5/thumbnails/8.jpg)
PhpProject Documentation, Release 0.12.0
1.2.2 Readers
Features MPX GANDocument Properties Standard
CustomDocument InformationsProject Task
ResourceAllocation
1.3 Contributing
We welcome everyone to contribute to PHPProject. Below are some of the things that you can do to contribute:
• Read our contributing guide
• Fork us and request a pull to the develop branch
• Submit bug reports or feature requests to GitHub
• Follow @PHPOffice on Twitter
4 Chapter 1. Introduction
![Page 9: PhpProject Documentation - Read the Docs · PDF filePhpProject Documentation, Release 0.12.0 |PHPProject| PHPProject is a library written in pure PHP that provides a set of classes](https://reader031.vdocument.in/reader031/viewer/2022021509/5aa0adde7f8b9a84178e8a83/html5/thumbnails/9.jpg)
CHAPTER 2
Installing/configuring
2.1 Requirements
Mandatory:
• PHP 5.3+
• PHP XML Parser extension
Optional PHP extensions:
• XMLWriter
2.2 Installation
There are two ways to install PHPProject, i.e. via Composer or manually by downloading the library.
2.2.1 Using Composer
To install via Composer, add the following lines to your composer.json:
{"require": {
"phpoffice/phpproject": "dev-master"}
}
2.2.2 Manual install
To install manually, download PHPProject package from github. Extract the package and put the contents toyour machine. To use the library, include src/PHPProject/Autoloader.php in your script and invokeAutoloader::register.
require_once ’/path/to/src/PhpProject/Autoloader.php’;\PhpOffice\PhpProject\Autoloader::register();
5
![Page 10: PhpProject Documentation - Read the Docs · PDF filePhpProject Documentation, Release 0.12.0 |PHPProject| PHPProject is a library written in pure PHP that provides a set of classes](https://reader031.vdocument.in/reader031/viewer/2022021509/5aa0adde7f8b9a84178e8a83/html5/thumbnails/10.jpg)
PhpProject Documentation, Release 0.12.0
2.3 Using samples
After installation, you can browse and use the samples that we’ve provided, either by command line or using browser.If you can access your PHPProject library folder using browser, point your browser to the samples folder, e.g.http://localhost/PhpProject/samples/.
6 Chapter 2. Installing/configuring
![Page 11: PhpProject Documentation - Read the Docs · PDF filePhpProject Documentation, Release 0.12.0 |PHPProject| PHPProject is a library written in pure PHP that provides a set of classes](https://reader031.vdocument.in/reader031/viewer/2022021509/5aa0adde7f8b9a84178e8a83/html5/thumbnails/11.jpg)
CHAPTER 3
General usage
3.1 Basic example
The following is a basic example of the PHPProject library. More examples are provided in the samples folder.
require_once ’src/PhpProject/Autoloader.php’;\PhpOffice\PhpProject\Autoloader::register();
$objPHPProject = new PhpProject();
// Create resource$objRes1 = $objPHPProject->createResource();$objRes1->setTitle(’UserBoy’);
// Create a task$objTask1 = $objPHPProject->createTask();$objTask1->setName(’Start of the project’);$objTask1->setStartDate(’02-01-2012’);$objTask1->setEndDate(’03-01-2012’);$objTask1->setProgress(0.5);$objTask1->addResource($objRes1);
$oWriterGAN = IOFactory::createWriter($objPHPPowerPoint, ’GanttProject’);$oWriterGAN->save(__DIR__ . "/sample.gan");
3.2 Document information
You can set the document information such as title, creator, and company name. Use the following functions:
$properties = $objPHPProject->getProperties();$properties->setCreator(’My name’);$properties->setCompany(’My factory’);$properties->setTitle(’My title’);$properties->setDescription(’My description’);$properties->setCategory(’My category’);$properties->setLastModifiedBy(’My name’);$properties->setCreated(mktime(0, 0, 0, 3, 12, 2014));$properties->setModified(mktime(0, 0, 0, 3, 14, 2014));$properties->setSubject(’My subject’);$properties->setKeywords(’my, key, word’);
7
![Page 12: PhpProject Documentation - Read the Docs · PDF filePhpProject Documentation, Release 0.12.0 |PHPProject| PHPProject is a library written in pure PHP that provides a set of classes](https://reader031.vdocument.in/reader031/viewer/2022021509/5aa0adde7f8b9a84178e8a83/html5/thumbnails/12.jpg)
PhpProject Documentation, Release 0.12.0
8 Chapter 3. General usage
![Page 13: PhpProject Documentation - Read the Docs · PDF filePhpProject Documentation, Release 0.12.0 |PHPProject| PHPProject is a library written in pure PHP that provides a set of classes](https://reader031.vdocument.in/reader031/viewer/2022021509/5aa0adde7f8b9a84178e8a83/html5/thumbnails/13.jpg)
CHAPTER 4
Task
A task is an activity that needs to be accomplished.
• name
• duration in days
• progress in percent
• date start
• date end
Example:
4.1 Allocation
For each task, a resource can be assigned.
9
![Page 14: PhpProject Documentation - Read the Docs · PDF filePhpProject Documentation, Release 0.12.0 |PHPProject| PHPProject is a library written in pure PHP that provides a set of classes](https://reader031.vdocument.in/reader031/viewer/2022021509/5aa0adde7f8b9a84178e8a83/html5/thumbnails/14.jpg)
PhpProject Documentation, Release 0.12.0
10 Chapter 4. Task
![Page 15: PhpProject Documentation - Read the Docs · PDF filePhpProject Documentation, Release 0.12.0 |PHPProject| PHPProject is a library written in pure PHP that provides a set of classes](https://reader031.vdocument.in/reader031/viewer/2022021509/5aa0adde7f8b9a84178e8a83/html5/thumbnails/15.jpg)
CHAPTER 5
Resource
Resource is required to carry out a project task. It can be people or equipment.
• title
Example:
11
![Page 16: PhpProject Documentation - Read the Docs · PDF filePhpProject Documentation, Release 0.12.0 |PHPProject| PHPProject is a library written in pure PHP that provides a set of classes](https://reader031.vdocument.in/reader031/viewer/2022021509/5aa0adde7f8b9a84178e8a83/html5/thumbnails/16.jpg)
PhpProject Documentation, Release 0.12.0
12 Chapter 5. Resource
![Page 17: PhpProject Documentation - Read the Docs · PDF filePhpProject Documentation, Release 0.12.0 |PHPProject| PHPProject is a library written in pure PHP that provides a set of classes](https://reader031.vdocument.in/reader031/viewer/2022021509/5aa0adde7f8b9a84178e8a83/html5/thumbnails/17.jpg)
CHAPTER 6
Recipes
6.1 Title
Recipe Text
$content;
13
![Page 18: PhpProject Documentation - Read the Docs · PDF filePhpProject Documentation, Release 0.12.0 |PHPProject| PHPProject is a library written in pure PHP that provides a set of classes](https://reader031.vdocument.in/reader031/viewer/2022021509/5aa0adde7f8b9a84178e8a83/html5/thumbnails/18.jpg)
PhpProject Documentation, Release 0.12.0
14 Chapter 6. Recipes
![Page 19: PhpProject Documentation - Read the Docs · PDF filePhpProject Documentation, Release 0.12.0 |PHPProject| PHPProject is a library written in pure PHP that provides a set of classes](https://reader031.vdocument.in/reader031/viewer/2022021509/5aa0adde7f8b9a84178e8a83/html5/thumbnails/19.jpg)
CHAPTER 7
Frequently asked questions
15
![Page 20: PhpProject Documentation - Read the Docs · PDF filePhpProject Documentation, Release 0.12.0 |PHPProject| PHPProject is a library written in pure PHP that provides a set of classes](https://reader031.vdocument.in/reader031/viewer/2022021509/5aa0adde7f8b9a84178e8a83/html5/thumbnails/20.jpg)
PhpProject Documentation, Release 0.12.0
16 Chapter 7. Frequently asked questions
![Page 21: PhpProject Documentation - Read the Docs · PDF filePhpProject Documentation, Release 0.12.0 |PHPProject| PHPProject is a library written in pure PHP that provides a set of classes](https://reader031.vdocument.in/reader031/viewer/2022021509/5aa0adde7f8b9a84178e8a83/html5/thumbnails/21.jpg)
CHAPTER 8
Credits
17
![Page 22: PhpProject Documentation - Read the Docs · PDF filePhpProject Documentation, Release 0.12.0 |PHPProject| PHPProject is a library written in pure PHP that provides a set of classes](https://reader031.vdocument.in/reader031/viewer/2022021509/5aa0adde7f8b9a84178e8a83/html5/thumbnails/22.jpg)
PhpProject Documentation, Release 0.12.0
18 Chapter 8. Credits
![Page 23: PhpProject Documentation - Read the Docs · PDF filePhpProject Documentation, Release 0.12.0 |PHPProject| PHPProject is a library written in pure PHP that provides a set of classes](https://reader031.vdocument.in/reader031/viewer/2022021509/5aa0adde7f8b9a84178e8a83/html5/thumbnails/23.jpg)
CHAPTER 9
References
9.1 GanttProject (GAN)
• Website
9.2 MSProjectExchange (MPX)
• MSDN : Description of the MPX Project File Exchange Format
19
![Page 24: PhpProject Documentation - Read the Docs · PDF filePhpProject Documentation, Release 0.12.0 |PHPProject| PHPProject is a library written in pure PHP that provides a set of classes](https://reader031.vdocument.in/reader031/viewer/2022021509/5aa0adde7f8b9a84178e8a83/html5/thumbnails/24.jpg)
PhpProject Documentation, Release 0.12.0
20 Chapter 9. References
![Page 25: PhpProject Documentation - Read the Docs · PDF filePhpProject Documentation, Release 0.12.0 |PHPProject| PHPProject is a library written in pure PHP that provides a set of classes](https://reader031.vdocument.in/reader031/viewer/2022021509/5aa0adde7f8b9a84178e8a83/html5/thumbnails/25.jpg)
CHAPTER 10
Indices and tables
• genindex
• modindex
• search
21