![]() PEAR_PackageFileManager : The Definitive Guide |
Table of Contents
This lesson :
teachs you how to build your first package from scratch.
teachs you to distinct usage of setOptions()
and importOptions()
methods.
While in reality, we could find the same generator script to build a
package.xml
on first time, and update
it later, both classes PEAR_PackageFileManager and
PEAR_PackageFileManager2 provides two distinct ways of generation,
using : setOptions()
and importOptions()
. We will focus only, in this
chapter, on the first method. Later we will see usage of second
method when we will talk how to update an existing package.
Lets see step by step how to define a new package with the two versions of PEAR_PackageFileManager.
To define a new package we will need to know some informations, such as : its name, a little summary, and a longer description. But we need also to know where package sources resides, and where it should be installed (on PEAR infrastructure).
With package.xml
version 1.0, almost
all properties were set with the setOptions()
method. With package.xml
version 2.0, there are new functions to
get/set property individually. Among these ones, there is :
name
getPackage()
, setPackage()
extends
getExtends()
, setExtends()
channel
getChannel()
, setChannel()
uri
getUri()
, setUri()
summary
getSummary()
, setSummary()
description
getDescription()
, setDescription()
To produce a package.xml
version 1.0,
here is the basic sheme
To produce a package.xml
version 2.0
PEAR_PackageFileManager : The Definitive Guide | v 1.6.0 : November 17, 2006 |