Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 66 lines (63 sloc) 2.394 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
<?php
error_reporting(0);
require_once 'PEAR/PackageFileManager2.php';
// recommended - makes PEAR_Errors act like exceptions (kind of)
PEAR::setErrorHandling(PEAR_ERROR_DIE);

$packagexml = new PEAR_PackageFileManager2();
$packagexml->setOptions(
    array(
    'filelistgenerator' => 'file',
    'packagedirectory' => dirname(__FILE__),
    'baseinstalldir' => '/',
    'dir_roles' => array(
        'examples' => 'doc',
        'docs' => 'doc',
        'tests' => 'test'
        ),
    'ignore' => array(
        'package.php',
        'package.xml',
        'package.xml.old'
    ),
    'simpleoutput' => true)
);
$packagexml->setPackageType('php');
$packagexml->addRelease();
$packagexml->setPackage('Create_KML');
$packagexml->setChannel('pear.php.net');
$packagexml->setReleaseVersion('0.1.0');
$packagexml->setAPIVersion('0.1.0');
$packagexml->setReleaseStability('alpha');
$packagexml->setAPIStability('alpha');
$packagexml->setSummary('Class to create KML code from a set of data');
$packagexml->setDescription('Class for creating KML code from a data source and outputing it to either a file or string');
$packagexml->setNotes('Various fixes and changes as suggested from the comments on proposal.
* The function to create the KML code now uses the SimpleXML class.
* Function to create KML code is now in the magic __toString() method under the XML_KML_Create
* Removed the save() method
* Implemented constructers and destructers
* Implemented one-class-per-file rule adding Main.php KML/Place.php and KML/Style.php
* Changed class name KML to XML_KML_Create
* Changed class name KMLPlace to XML_KML_Place
* Changed class name KMLStyle to XML_KML_Style
* Implemented set*() methods on XML_KML_Style and XML_KML_Place that validate input
* Code now adheres to PHPCodeSniffer standards');
$packagexml->setPhpDep('5.3.0');
$packagexml->setPearinstallerDep('1.7.0');
$packagexml->addMaintainer('lead', 'hamstar', 'Robert McLeod', 'hamstar@telescum.co.nz');
$packagexml->setLicense(
    'LGPL License 2.1',
    'http://www.gnu.org/copyleft/lesser.html'
);
$packagexml->addGlobalReplacement('package-info', '@PEAR-VER@', 'version');
$packagexml->generateContents();

if (isset($_GET['make'])
    || (isset($_SERVER['argv'])
    && @$_SERVER['argv'][1] == 'make')
) {
    $packagexml->writePackageFile();
} else {
    $packagexml->debugPackageFile();
}
// vim:set et ts=4 sw=4:
?>
Something went wrong with that request. Please try again.