| 1 | <?php |
|---|
| 2 | /** |
|---|
| 3 | * package.xml generation file for patTemplate |
|---|
| 4 | * |
|---|
| 5 | * This file is executed by createSnaps.php to |
|---|
| 6 | * automatically create a package that can be |
|---|
| 7 | * installed via the PEAR installer. |
|---|
| 8 | * |
|---|
| 9 | * $Id$ |
|---|
| 10 | * |
|---|
| 11 | * @author Stephan Schmidt <schst@php-tools.net> |
|---|
| 12 | * @package patForms |
|---|
| 13 | * @subpackage Tools |
|---|
| 14 | */ |
|---|
| 15 | |
|---|
| 16 | /** |
|---|
| 17 | * uses PackageFileManager |
|---|
| 18 | */ |
|---|
| 19 | require_once 'PEAR/PackageFileManager.php'; |
|---|
| 20 | |
|---|
| 21 | /** |
|---|
| 22 | * current version |
|---|
| 23 | */ |
|---|
| 24 | $version = '0.9.0a2'; |
|---|
| 25 | |
|---|
| 26 | /** |
|---|
| 27 | * current state |
|---|
| 28 | */ |
|---|
| 29 | $state = 'alpha'; |
|---|
| 30 | |
|---|
| 31 | /** |
|---|
| 32 | * release notes |
|---|
| 33 | */ |
|---|
| 34 | $notes = <<<EOT |
|---|
| 35 | Changes since v0.9.0a2: |
|---|
| 36 | - Changed scripts collection mechanism in patForms, patForms_Element and patForms_Rule for clientside validation. (This closes bug #133) (Sven Fuchs) |
|---|
| 37 | - Added an event onValidate to patForms and registered storages to listen to this event. This allows patForms_Storage containers to do their own validation, e.g. for unique keys. (This closes bug #130) (Sven Fuchs) |
|---|
| 38 | - Added several patForms_Rules to match Propel Validator classes and enable client side validation for these. New rules are: MaxLength, MinLength, MaxValue, MinValue, Match, NotMatch, ValidValues (Sven Fuchs) |
|---|
| 39 | - Added a class patForms_Definition: base class for xml based form definitions (Sven Fuchs) |
|---|
| 40 | - Added a class patForms_Definition_Propel: definition that either populates itself from a Propel ObjectPeer class and writes itself to an xml file OR reads an existing xml file and populates itself from it, when this file exists (Sven Fuchs) |
|---|
| 41 | - Added a class patForms_Creator_Definition: creates a patForm instance and populates properties, elements and rules from a patForms_Definition instance (Sven Fuchs) |
|---|
| 42 | - Added a class patForms_Datasource_Propel: used to populate data to form elements for foreign key/related tables from a Propel ObjectPeer. (Sven Fuchs) |
|---|
| 43 | - Added a class patForms_Storage_Propel: implements the patForms_Storage interface to integrate with a Propel object peer. (Sven Fuchs) |
|---|
| 44 | - Changed patForms_Renderer_Array to not include patForms_Datasource objects in the results array (This closes bug #131) (Sven Fuchs) |
|---|
| 45 | EOT; |
|---|
| 46 | |
|---|
| 47 | /** |
|---|
| 48 | * package description |
|---|
| 49 | */ |
|---|
| 50 | $description = <<<EOT |
|---|
| 51 | patForms is a powerful package that helps you creating an validating forms. It is not limited to HTML forms. |
|---|
| 52 | EOT; |
|---|
| 53 | |
|---|
| 54 | $package = new PEAR_PackageFileManager(); |
|---|
| 55 | |
|---|
| 56 | $result = $package->setOptions(array( |
|---|
| 57 | 'package' => 'patForms', |
|---|
| 58 | 'summary' => 'Powerful form management package.', |
|---|
| 59 | 'description' => $description, |
|---|
| 60 | 'version' => $version, |
|---|
| 61 | 'state' => $state, |
|---|
| 62 | 'license' => 'LGPL', |
|---|
| 63 | 'filelistgenerator' => 'cvs', |
|---|
| 64 | 'ignore' => array( 'package.php', 'autopackage.php', 'package.xml', 'package2.xml', '.cvsignore' ), |
|---|
| 65 | 'notes' => $notes, |
|---|
| 66 | 'simpleoutput' => true, |
|---|
| 67 | 'baseinstalldir' => 'pat', |
|---|
| 68 | 'packagedirectory' => './', |
|---|
| 69 | 'dir_roles' => array( |
|---|
| 70 | 'docs' => 'doc', |
|---|
| 71 | 'examples' => 'doc', |
|---|
| 72 | 'tests' => 'test', |
|---|
| 73 | ) |
|---|
| 74 | )); |
|---|
| 75 | |
|---|
| 76 | if (PEAR::isError($result)) { |
|---|
| 77 | echo $result->getMessage(); |
|---|
| 78 | die(); |
|---|
| 79 | } |
|---|
| 80 | |
|---|
| 81 | $package->addMaintainer('argh', 'lead', 'Sebastian Mordziol', 'argh@php-tools.net'); |
|---|
| 82 | $package->addMaintainer('schst', 'lead', 'Stephan Schmidt', 'schst@php-tools.net'); |
|---|
| 83 | $package->addMaintainer('gerd', 'developer', 'Gerd Schaufelberger', 'gerd@php-tools.net'); |
|---|
| 84 | $package->addMaintainer('luckec', 'helper', 'Carsten Lucke', 'carsten@tool-garage.de'); |
|---|
| 85 | |
|---|
| 86 | $package->addDependency('patError', '', 'has', 'pkg', false); |
|---|
| 87 | $package->addDependency('php', '4.2.0', 'ge', 'php', false); |
|---|
| 88 | $package->addDependency('DB', '', 'has', 'pkg', true); |
|---|
| 89 | |
|---|
| 90 | if (isset($_GET['make']) || (isset($_SERVER['argv'][1]) && $_SERVER['argv'][1] == 'make')) { |
|---|
| 91 | $result = $package->writePackageFile(); |
|---|
| 92 | } else { |
|---|
| 93 | $result = $package->debugPackageFile(); |
|---|
| 94 | } |
|---|
| 95 | |
|---|
| 96 | if (PEAR::isError($result)) { |
|---|
| 97 | echo $result->getMessage(); |
|---|
| 98 | die(); |
|---|
| 99 | } |
|---|
| 100 | ?> |
|---|