本文整理汇总了PHP中PEAR_PackageFileManager2::setUri方法的典型用法代码示例。如果您正苦于以下问题:PHP PEAR_PackageFileManager2::setUri方法的具体用法?PHP PEAR_PackageFileManager2::setUri怎么用?PHP PEAR_PackageFileManager2::setUri使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PEAR_PackageFileManager2
的用法示例。
在下文中一共展示了PEAR_PackageFileManager2::setUri方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
* @since 0.1.0
* @version @package-version@
*/
require_once 'PEAR/PackageFileManager2.php';
$version = '1.0.2';
$notes = '* initial release as PEAR';
$web_dir = 'www';
$ignore = array('makepackage.php', '*.tgz', 'tests/', '.svn/', 'build.xml', 'config.elevforeningen.php');
$postinstall_file = 'elevforeningen.php';
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$pfm = new PEAR_PackageFileManager2();
$pfm->setOptions(array('baseinstalldir' => '/', 'filelistgenerator' => 'file', 'packagedirectory' => dirname(__FILE__) . '/src', 'packagefile' => 'package.xml', 'ignore' => $ignore, 'dir_roles' => array('www' => 'web'), 'simpleoutput' => true, 'addhiddenfiles' => true));
$pfm->setPackage('VIH_Elevforeningen');
$pfm->setSummary('VIH');
$pfm->setDescription('VIH');
$pfm->setUri('http://localhost/');
$pfm->setLicense('LGPL License', 'http://www.gnu.org/licenses/lgpl.html');
$pfm->addMaintainer('lead', 'lsolesen', 'Lars Olesen', 'lars@legestue.net');
$pfm->setPackageType('php');
$pfm->setAPIVersion($version);
$pfm->setReleaseVersion($version);
$pfm->setAPIStability('beta');
$pfm->setReleaseStability('stable');
$pfm->setNotes($notes);
$pfm->addRelease();
$pfm->resetUsesRole();
$pfm->addUsesRole('web', 'Role_Web', 'pearified.com');
$pfm->addPackageDepWithChannel('required', 'Role_Web', 'pearified.com', '1.1.1');
// $pfm->addGlobalReplacement('package-info', '@package-version@', 'version');
$pfm->addReplacement($postinstall_file, 'pear-config', '@php-dir@', 'php_dir');
$pfm->addReplacement($postinstall_file, 'pear-config', '@web-dir@', 'web_dir');
示例2: dirname
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
*/
require_once 'PEAR/PackageFileManager2.php';
$version = '0.9.2';
$stability = 'beta';
$notes = '* initial release as a PEAR package';
$url = 'http://downloads.sf.net/pel/PEL-' . $version . '.tgz';
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$pfm = new PEAR_PackageFileManager2();
$pfm->setOptions(array('baseinstalldir' => 'PEL', 'filelistgenerator' => 'file', 'packagedirectory' => dirname(__FILE__), 'packagefile' => 'package.xml', 'ignore' => array('makepackagexml.php', '*.tgz', '*.sh', 'test/', 'tutorials/', 'authors.xml'), 'dir_roles' => array('doc' => 'doc', 'examples' => 'doc', 'test' => 'test'), 'exceptions' => array('README' => 'doc', 'AUTHORS' => 'doc', 'COPYING' => 'doc', 'INSTALL' => 'doc', 'NEWS' => 'doc', 'TODO' => 'doc'), 'simpleoutput' => true));
$pfm->setPackage('PEL');
$pfm->setSummary('The PHP Exif Library (PEL) lets you fully manipulate Exif (Exchangeable Image File Format) data.');
$pfm->setDescription('The PHP Exif Library (PEL) lets you fully manipulate Exif (Exchangeable Image File Format) data. This is the data that digital cameras place in their images, such as the date and time, shutter speed, ISO value and so on.
Using PEL, one can fully modify the Exif data, meaning that it can be both read and written. Completely new Exif data can also be added to images. PEL is written completely in PHP and depends on nothing except a standard installation of PHP, version 5. PEL is hosted on SourceForge.');
$pfm->setUri($url);
$pfm->setLicense('GPL License', 'http://www.gnu.org/licenses/gpl.html');
$pfm->addMaintainer('lead', 'mgeisler', 'Martin Geisler', 'mgeisler@mgeisler.net');
$pfm->addMaintainer('helper', 'lsolesen', 'Lars Olesen', 'lars@legestue.net');
$pfm->setPackageType('php');
$pfm->setAPIVersion($version);
$pfm->setReleaseVersion($version);
$pfm->setAPIStability($stability);
$pfm->setReleaseStability($stability);
$pfm->setNotes($notes);
$pfm->addRelease();
$pfm->clearDeps();
$pfm->setPhpDep('5.0.0');
$pfm->setPearinstallerDep('1.5.0');
$pfm->generateContents();
if (isset($_GET['make']) || isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
示例3: exit
echo " \$ sudo pear upgrade PEAR\n";
echo " \$ sudo pear install XML_Serializer-0.19.2\n";
echo " \$ sudo pear install --alldeps PEAR_PackageFileManager2\n\n";
exit(0);
}
$version = '2.1.1';
$stability = 'stable';
$notes = 'Mostly bug fixes.';
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$pfm = new PEAR_PackageFileManager2();
$pfm->setOptions(array('baseinstalldir' => '/', 'filelistgenerator' => 'file', 'packagedirectory' => dirname(__FILE__) . '/../', 'packagefile' => 'package.xml', 'addhiddenfiles' => true, 'ignore' => array('*script*', '*.svn*', '*.tgz'), 'dir_roles' => array('test' => 'test', 'examples' => 'doc', 'docs' => 'doc', 'lib' => 'php'), 'exceptions' => array(), 'simpleoutput' => true));
$pfm->setPackage('konstrukt');
$pfm->setSummary('A HTTP-friendly framework of controllers for PHP5.');
$pfm->setDescription('
Konstrukt is a minimalistic framework which provides a foundation on which to build rather than a boxed solution to all problems. It focuses on the controller layer, and tries to encourage the developer to deal directly with the HTTP protocol instead of abstracting it away. Konstrukt uses a hierarchical controller pattern, which provides a greater level of flexibility than the popular routed front controller frameworks.');
$pfm->setUri('http://www.konstrukt.dk/');
$pfm->setLicense('LGPL License', 'http://www.gnu.org/licenses/lgpl.html');
$pfm->addMaintainer('lead', 'troelskn', 'Troels Knak-Nielsen', 'troelskn@gmail.com');
$pfm->addMaintainer('helper', 'anders.ekdahl', 'Anders Ekdahl', '');
$pfm->addMaintainer('helper', 'lsolesen', 'Lars Olesen', 'lsolesen@users.sourceforge.net');
$pfm->setPackageType('php');
$pfm->setAPIVersion($version);
$pfm->setReleaseVersion($version);
$pfm->setAPIStability($stability);
$pfm->setReleaseStability($stability);
$pfm->setNotes($notes);
$pfm->addRelease();
$pfm->clearDeps();
$pfm->setPhpDep('5.2.0');
$pfm->setPearinstallerDep('1.5.0');
$lib_files = array('konstrukt/adapter.inc.php', 'konstrukt/charset.inc.php', 'konstrukt/konstrukt.inc.php', 'konstrukt/template.inc.php', 'konstrukt/logging.inc.php', 'konstrukt/response.inc.php', 'konstrukt/virtualbrowser.inc.php');
示例4: array
<?php
/**
* Creates the package.xml file needed for distribution.
*
* Use php PackageManager.php to test output on cli,
* php PackageManager.php make to really generate package.xml
*/
require_once 'PEAR/PackageFileManager2.php';
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$packagexml = new PEAR_PackageFileManager2();
$e = $packagexml->setOptions(array('clearcontents' => true, 'baseinstalldir' => 'SQLI', 'packagedirectory' => '.', 'dir_roles' => array('scripts' => 'script', 'tests' => 'test', 'CodeSniffer/Standards/Generic/Reports' => 'php', 'CodeSniffer/Standards/GN/Reports' => 'php', 'CodeSniffer/Standards/GNNew/Reports' => 'php', 'CodeSniffer/Standards/ZF/Reports' => 'php', 'CodeSniffer/Standards/Symfony/Reports' => 'php', 'CodeSniffer/Standards/Generic/Tests' => 'test', 'CodeSniffer/Standards/GN/Tests' => 'test', 'CodeSniffer/Standards/GNNew/Tests' => 'test', 'CodeSniffer/Standards/ZF/Tests' => 'test', 'CodeSniffer/Standards/Symfony/Tests' => 'test'), 'installexceptions' => array('scripts/sqlics.dist' => '/', 'scripts/sqlics.bat.dist' => '/')));
$packagexml->setPackage('SQLI_CodeSniffer');
$packagexml->setSummary('SQLI extension to PHP_CodeSniffer');
$packagexml->setDescription('SQLI_CodeSniffer extends PHP_CodeSniffer to add violation codes and configurable severities and messages');
$packagexml->setUri('http://www.assembla.com/spaces/sqlics/documents');
$packagexml->setAPIVersion('0.4.0dev1');
$packagexml->setReleaseVersion('0.4.0dev1');
$packagexml->setReleaseStability('devel');
$packagexml->setAPIStability('devel');
$packagexml->setNotes("This version adds/recovers some compatibility with PHP_CodeSniffer : sniffers' interface, tests.");
$packagexml->setPackageType('php');
// this is a PEAR-style php script package
$packagexml->setPhpDep('5.1.2');
$packagexml->setPearinstallerDep('1.4.0b1');
$packagexml->addPackageDepWithChannel('package', 'PHP_CodeSniffer', 'pear.php.net', '1.2.0RC1');
$packagexml->addMaintainer('lead', 'blacksun', 'Gabriele Santini', 'gsantini@sqli.com');
$packagexml->setLicense('New BSD License', 'http://www.opensource.org/licenses/bsd-license.php');
$packagexml->addRelease();
// set up a release section
$packagexml->setOSInstallCondition('windows');
示例5:
if (!isset($_SERVER['argv'][1])) {
print "Usage: php{$_SERVER['argv'][0]} package_uri uri|channel [make]\n";
print "ex)\n1) php {$_SERVER['argv'][0]} pear.example.co.jp channel \n";
print "2) php {$_SERVER['argv'][0]} pear.example.co.jp channel make\n";
print "3) cd ../../\n";
print "4) pear package-validate\n";
print "5) pear package\n";
exit;
} else {
$uri = $_SERVER['argv'][1];
}
/**
* network install package or local package
*/
if ($_SERVER['argv'][2] == 'uri') {
$packagexml->setUri($uri);
} else {
$packagexml->setChannel($uri);
}
/**
* this makes local install package
*/
$packagexml->generateContents();
// note use of debugPackageFile() - this is VERY important
if ($_SERVER['argv'][3] != 'debug') {
_debugPrint("writePackageFile\n");
$result = $packagexml->writePackageFile();
} else {
$result = $packagexml->debugPackageFile();
_debugPrint("debugPackageFile\n");
}