本文整理汇总了PHP中PEAR_PackageFileManager2::importOptions方法的典型用法代码示例。如果您正苦于以下问题:PHP PEAR_PackageFileManager2::importOptions方法的具体用法?PHP PEAR_PackageFileManager2::importOptions怎么用?PHP PEAR_PackageFileManager2::importOptions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PEAR_PackageFileManager2
的用法示例。
在下文中一共展示了PEAR_PackageFileManager2::importOptions方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createPackager
function createPackager($original_file, $options = array())
{
// merge the options with these defaults.
$options = array_merge(array('packagefile' => 'package.xml', 'filelistgenerator' => 'file', 'simpleoutput' => true, 'baseinstalldir' => '/DbPatch', 'packagedirectory' => dirname(__FILE__) . '/../', 'clearcontents' => true, 'ignore' => array('deploy.properties', 'deploy.xml', 'build/*', 'bin/package.php'), 'exceptions' => array('bin/dbpatch.php' => 'script', 'bin/dbpatch.bat' => 'script', 'LICENSE' => 'php', 'phpunit.xml.dist' => 'php', 'README.md' => 'php', 'TODOS.md' => 'php', 'CHANGES.md' => 'php'), 'installexceptions' => array('bin/dbpatch.php' => '/', 'bin/dbpatch.bat' => '/'), 'dir_roles' => array('bin' => 'php', 'docs' => 'php', 'tests' => 'php', 'src' => 'php')), $options);
$packagexml = PEAR_PackageFileManager2::importOptions($original_file, $options);
$packagexml->setPackageType('php');
$packagexml->setPackage('DbPatch');
$packagexml->setSummary('DbPatch is an open-source PHP command-line utility to patch your MySQL database.');
$packagexml->setDescription(<<<DESC
DbPatch is an open-source PHP command-line utility to patch your MySQL database.
Add a patch file to your codebase and use a single command to easily update your database.
DESC
);
$packagexml->setChannel('pear.dbpatch-project.com');
$packagexml->setNotes('Please see the README in the root of the application for the latest changes');
$packagexml->setPhpDep('5.1.6');
$packagexml->setPearinstallerDep('1.4.0');
$packagexml->addPackageDepWithChannel('required', 'PEAR', 'pear.php.net', '1.4.0');
$packagexml->addReplacement('bin/dbpatch.php', 'pear-config', '/usr/bin/env php', 'php_bin');
$packagexml->addReplacement('bin/dbpatch.php', 'pear-config', '@php_bin@', 'php_bin');
$packagexml->addReplacement('bin/dbpatch.php', 'pear-config', '@php_dir@', 'php_dir');
$packagexml->addMaintainer('lead', 'sndpl', 'Sandy Pleyte', 'sandy@ibuildings.nl');
$packagexml->addMaintainer('lead', 'mdletter', 'Martijn De Letter', 'martijn@ibuildings.nl');
$packagexml->setLicense('MIT', 'http://www.opensource.org/licenses/mit-license.html');
// Add this as a release, and generate XML content
$packagexml->addRelease();
$packagexml->setOSInstallCondition('windows');
$packagexml->addInstallAs('bin/dbpatch.bat', 'dbpatch.bat');
$packagexml->addInstallAs('bin/dbpatch.php', 'dbpatch.php');
$packagexml->addRelease();
$packagexml->addInstallAs('bin/dbpatch.php', 'dbpatch');
$packagexml->addIgnoreToRelease('bin/dbpatch.bat');
return $packagexml;
}
示例2: createPackager
function createPackager($original_file, $options = array())
{
// merge the options with these defaults.
$options = array_merge(array('packagefile' => 'package.xml', 'filelistgenerator' => 'file', 'simpleoutput' => true, 'baseinstalldir' => '/DocBlox', 'packagedirectory' => dirname(__FILE__) . '/../', 'clearcontents' => true, 'ignore' => array('build/*', 'data/themes/cache/*', 'data/output/*', 'data/log/*', 'bin/package.php', 'src/Image/*', 'src/Zend/*', 'src/markdown/*', 'src/markdown.php'), 'exceptions' => array('bin/docblox.php' => 'script', 'docblox.dist.xml' => 'php', 'LICENSE' => 'php', 'phpunit.xml.dist' => 'php', 'README' => 'php'), 'installexceptions' => array('bin/docblox.php' => '/', 'bin/docblox.bat' => '/'), 'dir_roles' => array('bin' => 'php', 'docs' => 'php', 'data' => 'php', 'tests' => 'php', 'src' => 'php')), $options);
$packagexml = PEAR_PackageFileManager2::importOptions($original_file, $options);
$packagexml->setPackageType('php');
$packagexml->setPackage('DocBlox');
$packagexml->setSummary('PHP 5.3 compatible API Documentation generator aimed at projects of all sizes and Continuous Integration');
$packagexml->setDescription(<<<DESC
DocBlox is a Documentation Generation Application (DGA) for use with PHP applications.
It is capable of transforming the comments in your source code into a full API reference document.
DocBlox is build to be PHP 5.3 compatible, fast, having a low memory consumption and easily integratable into Continuous Integration.
DESC
);
$packagexml->setChannel('pear.docblox-project.org');
$packagexml->setNotes('Please see the CHANGELOG in the root of the application for the latest changes');
$packagexml->setPhpDep('5.2.4');
$packagexml->setPearinstallerDep('1.4.0');
$packagexml->addPackageDepWithChannel('required', 'PEAR', 'pear.php.net', '1.4.0');
$packagexml->addPackageDepWithChannel('required', 'Image_GraphViz', 'pear.php.net', '1.3.0');
$packagexml->addPackageDepWithChannel('required', 'zf', 'pear.zfcampus.org', '1.11.3');
$packagexml->addPackageDepWithChannel('required', 'MarkdownExtra', 'pear.michelf.com', '1.2.4');
$packagexml->addReplacement('bin/docblox.bat', 'pear-config', '/usr/bin/env php', 'php_bin');
$packagexml->addReplacement('bin/docblox.bat', 'pear-config', '@php_bin@', 'php_bin');
$packagexml->addReplacement('bin/docblox.bat', 'pear-config', '@php_dir@', 'php_dir');
$packagexml->addReplacement('bin/docblox.php', 'pear-config', '/usr/bin/env php', 'php_bin');
$packagexml->addReplacement('bin/docblox.php', 'pear-config', '@php_bin@', 'php_bin');
$packagexml->addReplacement('bin/docblox.php', 'pear-config', '@php_dir@', 'php_dir');
$packagexml->addMaintainer('lead', 'mvriel', 'Mike van Riel', 'mike.vanriel@naenius.com');
$packagexml->setLicense('MIT', 'http://www.opensource.org/licenses/mit-license.html');
// Add this as a release, and generate XML content
$packagexml->addRelease();
$packagexml->setOSInstallCondition('windows');
$packagexml->addInstallAs('bin/docblox.bat', 'docblox.bat');
$packagexml->addRelease();
$packagexml->addInstallAs('bin/docblox.php', 'docblox');
$packagexml->addIgnoreToRelease('bin/docblox.bat');
return $packagexml;
}
示例3: createPackager
/**
* Creates a packager object with all basic options set.
*
* @param string $original_file Path of the original package.xml.
* @param string[] $options Set of options to merge in.
*
* @return PEAR_Error|PEAR_PackageFileManager2
*/
function createPackager($original_file, $options = array())
{
// merge the options with these defaults.
$options = array_merge(array('packagefile' => 'package.xml', 'filelistgenerator' => 'file', 'simpleoutput' => true, 'baseinstalldir' => '/phpDocumentor', 'packagedirectory' => dirname(__FILE__) . '/../../', 'clearcontents' => true, 'ignore' => array('build.properties', 'build.xml', 'build/*', 'data/output/*', 'data/log/*', 'bin/utils/*', 'src/XHProf/*', 'vendor/twig/twig/ext/*'), 'exceptions' => array('bin/phpdoc.php' => 'script', 'bin/phpdoc.bat' => 'script', 'phpdoc.dist.xml' => 'php', 'LICENSE' => 'php', 'phpunit.xml.dist' => 'php', 'README' => 'php', 'VERSION' => 'php', 'vendor/phpunit/phpunit-mock-objects/PHPUnit/Framework/MockObject/Autoload.php.in' => 'php', 'vendor/phpunit/phpunit/PHPUnit/Framework/Assert/Functions.php.in' => 'php', 'vendor/phpunit/phpunit/PHPUnit/Autoload.php.in' => 'php', 'vendor/phpunit/php-token-stream/PHP/Token/Stream/Autoload.php.in' => 'php', 'vendor/phpunit/php-timer/PHP/Timer/Autoload.php.in' => 'php', 'vendor/phpunit/php-text-template/Text/Template/Autoload.php.in' => 'php', 'vendor/phpunit/php-file-iterator/File/Iterator/Autoload.php.in' => 'php', 'vendor/phpunit/php-code-coverage/PHP/CodeCoverage/Autoload.php.in' => 'php'), 'installexceptions' => array('bin/phpdoc.php' => '/', 'bin/phpdoc.bat' => '/'), 'dir_roles' => array('bin' => 'php', 'docs' => 'php', 'data' => 'php', 'tests' => 'php', 'src' => 'php')), $options);
$packagexml = PEAR_PackageFileManager2::importOptions($original_file, $options);
$packagexml->setPackageType('php');
$packagexml->setPackage('phpDocumentor');
$packagexml->setSummary('PHP 5.3 compatible API Documentation generator aimed at projects of ' . 'all sizes and Continuous Integration');
$packagexml->setDescription(<<<DESC
phpDocumentor is a Documentation Generation Application (DGA) for use with PHP applications.
It is capable of transforming the comments in your source code into a full API reference document.
phpDocumentor is build to be PHP 5.3 compatible, fast, having a low memory consumption and easily integratable into Continuous Integration.
DESC
);
$packagexml->setChannel('pear.phpdoc.org');
$packagexml->setNotes('Please see the CHANGELOG in the root of the application for the ' . 'latest changes');
$packagexml->setPhpDep('5.3.3');
$packagexml->setPearinstallerDep('1.4.0');
$packagexml->addReplacement('bin/phpdoc.php', 'pear-config', '/usr/bin/env php', 'php_bin');
$packagexml->addGlobalReplacement('pear-config', '@php_bin@', 'php_bin');
$packagexml->addReplacement('bin/phpdoc.php', 'pear-config', '@php_dir@', 'php_dir');
$packagexml->addMaintainer('lead', 'mvriel', 'Mike van Riel', 'mike.vanriel@naenius.com');
$packagexml->addMaintainer('lead', 'ashnazg', 'Chuck Burgess', 'ashnazg@php.net');
$packagexml->setLicense('MIT', 'http://www.opensource.org/licenses/mit-license.html');
// Add this as a release, and generate XML content
$packagexml->addRelease();
$packagexml->setOSInstallCondition('windows');
$packagexml->addInstallAs('bin/phpdoc.bat', 'phpdoc.bat');
$packagexml->addInstallAs('bin/phpdoc.php', 'phpdoc.php');
$packagexml->addRelease();
$packagexml->addInstallAs('bin/phpdoc.php', 'phpdoc');
$packagexml->addIgnoreToRelease('bin/phpdoc.bat');
return $packagexml;
}
示例4: getPfm
/**
* Get PackageFileManager2 instance
*
* @param string|PEAR_PackageFile_v1 $package
* @return PEAR_PackageFileManager2|PEAR_Error
*/
public function getPfm($package = null)
{
if (!$this->_pfm) {
if (is_null($package)) {
$this->_pfm = new PEAR_PackageFileManager2();
$this->_pfm->setOptions($this->get('options'));
} else {
$this->defineData();
$this->_pfm = PEAR_PackageFileManager2::importOptions($package, $this->get('options'));
if ($this->_pfm instanceof PEAR_Error) {
$e = PEAR_Exception('Could not instantiate PEAR_PackageFileManager2');
$e->errorObject = $this->_pfm;
throw $e;
}
}
}
return $this->_pfm;
}
示例5: error_reporting
<?php
error_reporting(error_reporting() & ~E_STRICT & ~E_DEPRECATED);
require_once 'PEAR/PackageFileManager2.php';
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$a = PEAR_PackageFileManager2::importOptions(dirname(__FILE__) . '/package-channel.xml', array('baseinstalldir' => '/pear.php.net/', 'packagefile' => 'package-channel.xml', 'filelistgenerator' => 'file', 'roles' => array('*' => 'www'), 'simpleoutput' => true, 'include' => array(dirname(__FILE__) . '/public_html/channel.xml', 'public_html/dtd/')));
$a->setReleaseVersion('1.15.2');
$a->setReleaseStability('stable');
$a->setAPIStability('stable');
$a->setNotes('
- update channel.xml to use correct port for de.pear.php.net
');
$a->resetUsesrole();
$a->clearDeps();
$a->setPhpDep('4.3.0');
$a->setPearInstallerDep('1.8.0');
$a->addPackageDepWithChannel('required', 'HTTP_Request2', 'pear.php.net');
$a->generateContents();
$a->writePackageFile();
示例6: array
* See the License for the specific language governing permissions and
* limitations under the License.
*
* PHP version 5
*
* @category Microsoft
* @package WindowsAzure
* @author Azure PHP SDK <azurephpsdk@microsoft.com>
* @copyright 2012 Microsoft Corporation
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
* @link https://github.com/windowsazure/azure-sdk-for-php
*/
require_once 'PEAR/PackageFileManager2.php';
require_once 'Defaults.php';
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$p =& PEAR_PackageFileManager2::importOptions(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'package.xml', array('packagefile' => 'package.xml', 'ignore' => $ignore, 'filelistgenerator' => 'file', 'packagedirectory' => dirname(__FILE__), 'changelogoldtonew' => false, 'simpleoutput' => false));
$p->addInclude($include);
$p->setPackage(PACKAGE_NAME);
$p->setSummary(PACKAGE_SUMMARY);
$p->setDescription(PACKAGE_DESCRIPTION);
$p->setNotes(PACKAGE_RELEASE_NOTES);
$p->setPackageType('php');
$p->addRelease();
$p->clearDeps();
$p->setChannel(CHANNEL_NAME);
$p->setLicense(PACKAGE_LICENSE, PACKAGE_LICENSE_AGREEMENT);
$p->setReleaseVersion(PACKAGE_RELEASE_VERSION);
$p->setAPIVersion(PACKAGE_API_VERSION);
$p->setReleaseStability(PACKAGE_RELEASE_STATE);
$p->setAPIStability(PACKAGE_API_STATE);
$p->setPhpDep(PACKAGE_MIN_PHP_VERSION);
示例7: array
/**
* Convert a package xml 1.0 to 2.0 with user and default options
*
* @param string $packagefile name of package file
* @param array $options (optional) list of generation options
*
* @return PEAR_PackageFileManager2|PEAR_Error
* @static
* @access public
* @since 1.6.0a1
*/
function &importFromPackageFile1($packagefile, $options = array())
{
$z =& PEAR_Config::singleton();
$pkg = new PEAR_PackageFile($z);
$pf = $pkg->fromPackageFile($packagefile, PEAR_VALIDATE_NORMAL);
if (PEAR::isError($pf)) {
return $pf;
}
if ($pf->getPackagexmlVersion() == '1.0') {
$packagefile =& $pf;
}
$a =& PEAR_PackageFileManager2::importOptions($packagefile, $options);
return $a;
}
示例8: ini_set
ini_set('display_errors', true);
/**
* Require the PEAR_PackageFileManager2 classes, and other
* necessary classes for package.xml file creation.
*/
require_once 'PEAR/PackageFileManager2.php';
require_once 'PEAR/PackageFileManager/File.php';
require_once 'PEAR/Task/Postinstallscript/rw.php';
require_once 'PEAR/Config.php';
require_once 'PEAR/Frontend.php';
/**
* @var PEAR_PackageFileManager
*/
PEAR::setErrorHandling(PEAR_ERROR_DIE);
chdir(dirname(__FILE__));
$pfm = PEAR_PackageFileManager2::importOptions('package.xml', array('packagedirectory' => dirname(__FILE__), 'baseinstalldir' => '/', 'filelistgenerator' => 'svn', 'ignore' => array('package.xml', '.project', '.buildpath', '*.tgz', 'makepackage.php', '.cache'), 'simpleoutput' => true, 'roles' => array('php' => 'php'), 'exceptions' => array()));
$pfm->setPackage('Savant3');
$pfm->setPackageType('php');
// this is a PEAR-style php script package
$pfm->setSummary('A PHP5 template system that uses PHP for its logic; provides path searching, plugins, filters, and an optional compiler system.');
$pfm->setDescription('Savant3 is an object-oriented system to help keep manipulation
logic (\'model\' or \'controller\' scripts) separate from display
logic (\'view\' scripts) using PHP-based templates. Savant3 is
E_STRICT compliant for PHP5, provides a plugin model for
convenience methods, supports output filter callbacks, allows
for custom compilers, and provides path searching for themed
(skinned) applications.');
$pfm->setChannel('phpsavant.com');
$pfm->setAPIStability('stable');
$pfm->setReleaseStability('stable');
$pfm->setAPIVersion('3.0.1');
示例9: execute
/**
* Executes the business logic involved with this command.
*
* @param InputInterface $input
* @param OutputInterface $output
*
* @return int
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
error_reporting(E_ALL & ~E_STRICT & ~E_DEPRECATED);
if (!@(include 'PEAR/PackageFileManager2.php')) {
throw new \Exception('Unable to find the PEAR_PackageFileManager2 package, ' . 'is it installed?');
}
\PEAR::setErrorHandling(PEAR_ERROR_DIE);
$args = $this->getRemainingArgs();
if (!isset($args[1])) {
throw new Exception('Missing path to the template source');
}
if (!isset($args[2])) {
throw new Exception('Missing the template name');
}
$path = $args[1];
$template = $args[2];
if (!preg_match('/^[a-z\\d][a-z_\\d]{2,}$/', $template)) {
throw new Exception('A template name may only consist of lowercase letters, digits and' . ' underscores; may not start with an underscore and consist of ' . 'at least 3 characters.');
}
if (!file_exists($path . '/template.xml') || !is_readable($path . '/template.xml')) {
throw new \Exception('Template definition (' . $path . '/template.xml) was not found ' . 'or is unreadable.');
}
$settings = simplexml_load_file($path . '/template.xml');
$version = (string) $settings->version;
$author = (string) $settings->author;
$description = (string) $settings->description;
$email = (string) $settings->email;
// merge the options with these defaults.
$options = array('packagefile' => 'package.xml', 'filelistgenerator' => 'file', 'simpleoutput' => true, 'baseinstalldir' => '/phpDocumentor/data/templates/' . $template, 'packagedirectory' => $path, 'clearcontents' => true, 'ignore' => array(), 'exceptions' => array(), 'installexceptions' => array(), 'dir_roles' => array('/' => 'php'));
$packagexml = PEAR_PackageFileManager2::importOptions('', $options);
$packagexml->setPackageType('php');
$packagexml->setPackage('phpDocumentor_Template_' . $template);
$packagexml->setSummary('The ' . $template . ' template for phpDocumentor');
$packagexml->setDescription($description);
$packagexml->setChannel('pear.phpdoc.org');
$packagexml->setNotes('Automatically generated by the phpDocumentor packager');
$packagexml->setPhpDep('5.2.6');
$packagexml->setPearinstallerDep('1.4.0');
$packagexml->addPackageDepWithChannel('required', 'PEAR', 'pear.php.net', '1.4.0');
$packagexml->addPackageDepWithChannel('required', 'phpDocumentor', 'pear.phpdoc.org', '0.17.0');
if ($settings->dependencies->template) {
foreach ($settings->dependencies->template as $dependency) {
$dependency_name = (string) $dependency['name'];
$dependency_version = (string) $dependency['version'];
$packagexml->addPackageDepWithChannel('required', 'phpDocumentor_Template_' . $dependency_name, 'pear.phpdoc.org', $dependency_version);
}
}
$packagexml->addMaintainer('lead', '', $author, $email);
$packagexml->setLicense('MIT', 'http://www.opensource.org/licenses/mit-license.html');
// Add this as a release, and generate XML content
$packagexml->addRelease();
$packagexml->setAPIVersion($version);
$packagexml->setReleaseVersion($version);
$packagexml->setReleaseStability('stable');
$packagexml->setAPIStability('stable');
$packagexml->generateContents();
if ($this->getDebug()) {
$packagexml->debugPackageFile();
return;
}
$packagexml->writePackageFile();
passthru('pear package ' . $path . '/package.xml');
return 0;
}
示例10: array
<?php
require_once 'PEAR/PackageFileManager2.php';
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$a = PEAR_PackageFileManager2::importOptions(dirname(__FILE__) . '/package-qa.xml', array('packagefile' => 'package-qa.xml', 'baseinstalldir' => '/pear.php.net/', 'filelistgenerator' => 'git', 'roles' => array('*' => 'www'), 'simpleoutput' => true, 'include' => array('public_html/qa/'), 'ignore' => array('public_html/qa/index.php')));
$a->setReleaseVersion('1.0.3');
$a->setReleaseStability('stable');
$a->setAPIStability('stable');
$a->setNotes('
Add an unmaintained category to the output of packages-closed-no-release
Remove restrictions on orphan package list
');
$a->resetUsesrole();
$a->clearDeps();
$a->setPhpDep('5.2.3');
$a->setPearInstallerDep('1.7.1');
$a->addPackageDepWithChannel('required', 'PEAR', 'pear.php.net', '1.7.1');
$a->addPackageDepWithChannel('required', 'pearweb', 'pear.php.net', '1.18.0');
$a->generateContents();
$a->writePackageFile();
if (isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
$a->writePackageFile();
} else {
$a->debugPackageFile();
}
示例11: die
Changes since 2.0.0a2: many bugfixes, removal of phar.extract_list, compression API refactored,
conversion API refactored
Changes since 2.0.0b1: addition of phar.cache_list, many performance improvements and bugfixes
implement OpenSSL asynchronous true package signing
add support for package signing to tar-based archives
require PHP 5.2.1+
';
if (!class_exists("Phar") && !extension_loaded("Phar")) {
die("Extension phar not present");
}
error_reporting(E_ALL & ~E_DEPRECATED);
require_once 'PEAR/PackageFileManager2.php';
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$options = array('filelistgenerator' => 'CVS', 'changelogoldtonew' => false, 'simpleoutput' => true, 'baseinstalldir' => '/', 'packagedirectory' => dirname(__FILE__), 'packagefile' => 'package.xml', 'clearcontents' => true, 'ignore' => array('package*.php', 'package*.xml'), 'dir_roles' => array('docs' => 'doc', 'examples' => 'doc', 'tests' => 'test', 'phar' => 'src'), 'exceptions' => array('CREDITS' => 'doc', 'EXPERIMENTAL' => 'doc', 'LICENSE' => 'doc', 'Makefile.frag' => 'src', 'phar_path_check.re' => 'src', 'TODO' => 'doc', 'phar.phar' => 'script'));
$package = PEAR_PackageFileManager2::importOptions(dirname(__FILE__) . '/package.xml', $options);
$package->clearDeps();
$package->setPhpDep('5.2.1');
$package->setPearInstallerDep('1.4.3');
$package->addPackageDepWithChannel('optional', 'bz2', 'pecl.php.net', false, false, false, false, 'bz2');
// all this false business sets the <providesextension> tag that allows us to have hash built
// in statically
$package->addPackageDepWithChannel('optional', 'hash', 'pecl.php.net', false, false, false, false, 'hash');
$package->addExtensionDep('optional', 'spl');
$package->addExtensionDep('optional', 'zlib');
$package->setPackageType('extsrc');
$package->addRelease();
$package->setReleaseVersion(phpversion('phar'));
$package->setAPIVersion(Phar::apiVersion());
$package->setReleaseStability('beta');
$package->setAPIStability('beta');
示例12: error_reporting
<?php
error_reporting(error_reporting() & ~E_STRICT & ~E_DEPRECATED);
require_once 'PEAR/PackageFileManager2.php';
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$a = PEAR_PackageFileManager2::importOptions(dirname(__FILE__) . '/package-manual.xml', array('packagefile' => 'package-manual.xml', 'baseinstalldir' => '/pear.php.net/', 'filelistgenerator' => 'file', 'roles' => array('*' => 'www'), 'exceptions' => array('pearweb_manual.php' => 'php'), 'simpleoutput' => true, 'include' => array('cron/apidoc-fix-latest.php', 'cron/apidoc-queue.php', 'cron/find-documentation.php', 'load-chm.sh', 'public_html/admin/apidoc-log.php', 'public_html/css/manual.css', 'public_html/error/404-manual.php', 'public_html/manual/', 'public_html/notes/', 'include/notes/', 'include/pear-manual.php', 'templates/notes/', 'sql/pearweb_manual.xml')));
$a->setReleaseVersion('1.2.2');
$a->setReleaseStability('stable');
$a->setAPIStability('stable');
$a->setNotes('
- Fix bug #16627: HTTP_Request2 - "latest" docs not linked
');
$a->resetUsesrole();
$a->clearDeps();
$a->setPhpDep('5.2.3');
$a->setPearInstallerDep('1.8.0');
$a->addPackageDepWithChannel('required', 'PEAR', 'pear.php.net', '1.8.0');
$a->addPackageDepWithChannel('required', 'pearweb', 'pear.php.net', '1.18.0');
$a->addPackageDepWithChannel('required', 'VFS', 'pear.php.net');
$a->addPackageDepWithChannel('required', 'HTTP_Request2', 'pear.php.net');
$a->addPackageDepWithChannel('required', 'phpDocumentor', 'pear.phpdoc.org');
$a->addExtensionDep('required', 'pcre');
$a->addExtensionDep('required', 'mysqli');
$script =& $a->initPostinstallScript('pearweb_manual.php');
$script->addParamGroup('askdb', array($script->getParam('yesno', 'Update pearweb database?', 'yesno', 'y')));
$script->addParamGroup('init', array($script->getParam('driver', 'Database driver', 'string', 'mysqli'), $script->getParam('user', 'Database User name', 'string', 'pear'), $script->getParam('password', 'Database password', 'password', 'pear'), $script->getParam('host', 'Database host', 'string', 'localhost'), $script->getParam('database', 'Database name', 'string', 'pear')));
$script->addParamGroup('askhttpd', array($script->getParam('yesno', 'Update httpd.conf to add pearweb? (y/n)', 'yesno', 'y')));
$script->addParamGroup('httpdconf', array($script->getParam('path', 'Full path to httpd.conf', 'string')));
$a->addPostinstallTask($script, 'pearweb_election.php');
$a->addReplacement('pearweb_election.php', 'pear-config', '@www-dir@', 'www_dir');
$a->addReplacement('pearweb_election.php', 'pear-config', '@php-dir@', 'php_dir');
示例13: error_reporting
<?php
error_reporting(error_reporting() & ~E_STRICT & ~E_DEPRECATED);
require_once 'PEAR/PackageFileManager2.php';
$dir = dirname(__FILE__);
$a = PEAR_PackageFileManager2::importOptions($dir . '/package.xml', array('baseinstalldir' => '/pear.php.net/', 'filelistgenerator' => 'file', 'roles' => array('*' => 'www'), 'exceptions' => array('pearweb.php' => 'php'), 'simpleoutput' => true, 'ignore' => array('*.phar', 'package-*.xml', 'package.php', 'package_*.php', 'tests/', 'weeklynews/', 'scripts/')));
$a->setReleaseVersion('1.26.1');
$a->setReleaseStability('stable');
$a->setAPIStability('stable');
$a->setNotes('
Fix #20098: Broken bug notifications catched as spam
');
$a->resetUsesrole();
$a->clearDeps();
$a->setPhpDep('5.2.3');
$a->setPearInstallerDep('1.8.1');
$a->addPackageDepWithChannel('required', 'PEAR', 'pear.php.net', '1.8.1');
$a->addPackageDepWithChannel('required', 'Archive_Tar', 'pear.php.net', '1.3.2');
$a->addPackageDepWithChannel('required', 'HTTP_Request2', 'pear.php.net');
$a->addPackageDepWithChannel('required', 'Date', 'pear.php.net');
$a->addPackageDepWithChannel('required', 'XML_Feed_Parser', 'pear.php.net');
$a->addPackageDepWithChannel('required', 'Services_Twitter', 'pear.php.net');
$a->addPackageDepWithChannel('required', 'Cache_Lite', 'pear.php.net');
$a->addPackageDepWithChannel('required', 'HTTP', 'pear.php.net', '1.4.0');
$a->addPackageDepWithChannel('required', 'Services_ReCaptcha', 'pear.php.net', '1.0.3');
$a->addPackageDepWithChannel('required', 'Text_CAPTCHA_Numeral', 'pear.php.net', '1.1.0');
$a->addPackageDepWithChannel('required', 'Services_ProjectHoneyPot', 'pear.php.net', '0.6.0');
// used only in cron jobs
$a->addPackageDepWithChannel('required', 'DB', 'pear.php.net', '1.6.5');
$a->addPackageDepWithChannel('required', 'DB_DataObject', 'pear.php.net', '1.8.5');
$a->addPackageDepWithChannel('required', 'Savant3', 'phpsavant.com', '3.0.0');
示例14: error_reporting
<?php
error_reporting(error_reporting() & ~E_STRICT & ~E_DEPRECATED);
require_once 'PEAR/PackageFileManager2.php';
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$a = PEAR_PackageFileManager2::importOptions(dirname(__FILE__) . '/package-index.xml', array('packagefile' => 'package-index.xml', 'baseinstalldir' => '/pear.php.net/', 'filelistgenerator' => 'file', 'roles' => array('*' => 'www'), 'simpleoutput' => true, 'include' => array('public_html/about/credits.php', 'public_html/about/index.php', 'public_html/about/privacy.php', 'public_html/group/', 'public_html/news/', 'public_html/qa/index.php', 'public_html/support/', 'public_html/copyright.php', 'public_html/index.php', 'public_html/mirrors.php', 'public_html/gophp5.php')));
$a->setReleaseVersion('1.22.2');
$a->setReleaseStability('stable');
$a->setAPIStability('stable');
$a->setNotes('
Fix #20500: twitter & identi.ca links broken
');
$a->resetUsesrole();
$a->clearDeps();
$a->setPhpDep('5.2.3');
$a->setPearInstallerDep('1.8.0');
$a->addPackageDepWithChannel('required', 'pearweb_qa', 'pear.php.net', '1.0.2');
$a->addPackageDepWithChannel('required', 'pearweb_pepr', 'pear.php.net', '1.0.2');
$a->addPackageDepWithChannel('required', 'pearweb', 'pear.php.net', '1.21.1');
$a->generateContents();
if (isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
$a->writePackageFile();
} else {
$a->debugPackageFile();
}
示例15: require
[ 1575145 ] \'-q on\' quiet mode not fully quiet
[ 1581487 ] subdirectory include another subdirectory doc error.
- fixed these bugs reported in PEAR:
Bug #8520: Broken XML when XML_Beautifier is installed
Bug #8533: require() broken in a lot of places - cannot run!
Bug #8539: Parser error in create_examples.php
Bug #8746: XML:DocBook generates warning with function/parameters without @param tag
Bug #8773: PDF Convertor fails due to being unable to find fonts
Bug #8914: returning non varibale reference ParserData.inc#500
The peardoc2 converter no longer uses funky PHP source highlighting, leaving
that to the peardoc build instead.
';
$version = '1.3.1';
$options = array('baseinstalldir' => 'PhpDocumentor', 'version' => $version, 'packagedirectory' => $packagedir, 'filelistgenerator' => 'cvs', 'notes' => $notes, 'package' => 'PhpDocumentor', 'dir_roles' => array('Documentation' => 'doc', 'Documentation/tests' => 'test', 'docbuilder' => 'data', 'HTML_TreeMenu-1.1.2' => 'data', 'tutorials' => 'doc'), 'simpleoutput' => true, 'exceptions' => array('index.html' => 'data', 'README' => 'doc', 'ChangeLog' => 'doc', 'LICENSE' => 'doc', 'poweredbyphpdoc.gif' => 'data', 'INSTALL' => 'doc', 'FAQ' => 'doc', 'Authors' => 'doc', 'Release-1.2.0beta1' => 'doc', 'Release-1.2.0beta2' => 'doc', 'Release-1.2.0beta3' => 'doc', 'Release-1.2.0rc1' => 'doc', 'Release-1.2.0rc2' => 'doc', 'Release-1.2.0' => 'doc', 'Release-1.2.1' => 'doc', 'Release-1.2.2' => 'doc', 'Release-1.2.3' => 'doc', 'Release-1.2.3.1' => 'doc', 'Release-1.3.0' => 'doc', 'Release-1.3.1' => 'doc', 'pear-phpdoc' => 'script', 'pear-phpdoc.bat' => 'script', 'HTML_TreeMenu-1.1.2/TreeMenu.php' => 'php', 'phpDocumentor/Smarty-2.6.0/libs/debug.tpl' => 'php', 'new_phpdoc.php' => 'data', 'phpdoc.php' => 'data'), 'ignore' => array('package.xml', 'package2.xml', '*templates/PEAR/*', 'publicweb-PEAR-1.2.1.patch.txt'), 'installexceptions' => array('pear-phpdoc' => '/', 'pear-phpdoc.bat' => '/', 'scripts/makedoc.sh' => '/'));
$pfm2 = PEAR_PackageFileManager2::importOptions(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'package.xml', array_merge($options, array('packagefile' => 'package.xml')));
$pfm2->setReleaseVersion($version);
$pfm2->setReleaseStability('stable');
$pfm2->setLicense('LGPL', 'http://www.opensource.org/licenses/lgpl-license.php');
$pfm2->setNotes($notes);
$pfm2->clearDeps();
$pfm2->setPhpDep('4.2.0');
$pfm2->setPearinstallerDep('1.4.6');
$pfm2->addPackageDepWithChannel('optional', 'XML_Beautifier', 'pear.php.net', '1.1');
$pfm2->addReplacement('pear-phpdoc', 'pear-config', '@PHP-BIN@', 'php_bin');
$pfm2->addReplacement('pear-phpdoc.bat', 'pear-config', '@PHP-BIN@', 'php_bin');
$pfm2->addReplacement('pear-phpdoc.bat', 'pear-config', '@BIN-DIR@', 'bin_dir');
$pfm2->addReplacement('pear-phpdoc.bat', 'pear-config', '@PEAR-DIR@', 'php_dir');
$pfm2->addReplacement('pear-phpdoc.bat', 'pear-config', '@DATA-DIR@', 'data_dir');
$pfm2->addReplacement('docbuilder/includes/utilities.php', 'pear-config', '@DATA-DIR@', 'data_dir');
$pfm2->addReplacement('docbuilder/builder.php', 'pear-config', '@DATA-DIR@', 'data_dir');