Re: PackageFileManager example broken in php5 ?
| From: | Dan Rossi | Date: | Thu, 26 Jan 2006 12:23:35 +0000 |
| Subject: | Re: PackageFileManager example broken in php5 ? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-22688@lists.php.net to get a copy of this message | ||
Summary and description options were needed.
On 26/01/2006, at 10:55 PM, Dan Rossi wrote:
Hi im looking at the packagefilemanager example, however off the shelf it wouldnt run, here is my error PEAR_PackageFileManager Error: Run $managerclass->setOptions() before any other methods , any ideas ? <?php /** * A simple example * @package PEAR_PackageFileManager */ /** * Include the package file manager */ require_once('PEAR/PackageFileManager.php'); $test = new PEAR_PackageFileManager; /* if (PEAR::isError($test)) {echo $test->getMessage(); exit;} */ $test->setOptions( array('baseinstalldir' => 'PEAR', 'version' => '0.1', 'packagedirectory' => '/www/dev/package', 'state' => 'alpha', 'filelistgenerator' => 'file', 'notes' => 'First release of package ', 'ignore' => array('package.xml'))); $test->addDependency('PEAR', '1.1'); $e = $test->writePackageFile(); if (PEAR::isError($e)) {echo $e->getMessage();} ?>