当前位置: 首页>>代码示例>>PHP>>正文


PHP PEAR_PackageFileManager2::setProvidesExtension方法代码示例

本文整理汇总了PHP中PEAR_PackageFileManager2::setProvidesExtension方法的典型用法代码示例。如果您正苦于以下问题:PHP PEAR_PackageFileManager2::setProvidesExtension方法的具体用法?PHP PEAR_PackageFileManager2::setProvidesExtension怎么用?PHP PEAR_PackageFileManager2::setProvidesExtension使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PEAR_PackageFileManager2的用法示例。


在下文中一共展示了PEAR_PackageFileManager2::setProvidesExtension方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: dirname

EOS;
// set parameters to the package
$packagexml = new PEAR_PackageFileManager2();
$packagexml->setOptions(array('baseinstalldir' => '/', 'packagedirectory' => dirname(__FILE__), 'filelistgenerator' => 'file', 'ignore' => array('package.php', 'package.xml', "{$packagename}-{$version}.tgz"), 'dir_roles' => array('tests' => 'test', 'manual' => 'doc', 'examples' => 'data'), 'exceptions' => array("{$packagename}.dsp" => 'src', 'CREDITS' => 'doc', 'EXPERIMENTAL' => 'doc', 'LICENSE' => 'doc', 'README' => 'doc')));
$packagexml->setPackage($packagename);
$packagexml->setSummary($summary);
$packagexml->setNotes($notes);
$packagexml->setDescription($description);
$packagexml->setLicense('MIT License', 'http://www.opensource.org/licenses/mit-license.php');
$packagexml->setReleaseVersion($version);
$packagexml->setAPIVersion($apiversion);
$packagexml->setReleaseStability($stability);
$packagexml->setAPIStability($apistability);
$packagexml->addMaintainer('lead', 'rsk', 'Ryusuke SEKIYAMA', 'rsky0711@gmail.com');
$packagexml->setPackageType('extsrc');
$packagexml->setProvidesExtension($packagename);
$packagexml->addConfigureOption('with-unichar-icu', 'Enable ICU-related features. Yes, no or pathname to icu-config.', 'no');
$packagexml->setPhpDep('4.4.0');
$packagexml->setPearinstallerDep('1.4.1');
$packagexml->setChannel($channel);
$packagexml->generateContents();
// generate package.xml
if (php_sapi_name() === 'cli' && $_SERVER['argc'] > 1 && $_SERVER['argv'][1] === 'make') {
    $make = true;
} elseif (!empty($_GET['make'])) {
    $make = true;
} else {
    $make = false;
}
// note use of debugPackageFile() - this is VERY important
if ($make) {
开发者ID:rsky,项目名称:php-unichar,代码行数:31,代码来源:package.php

示例2: init

/**
 * Initialize PackageFileManager
 *
 * @param   array $cfg
 * @return  PEAR_PackageFileManager2
 */
function init(array $cfg)
{
    extract($cfg);
    $package = new \PEAR_PackageFileManager2();
    $package->setOptions($options);
    $package->setPackage($name);
    $package->setSummary($summary);
    $package->setNotes($notes);
    $package->setDescription($description);
    $package->setLicense($license, $licenseUri);
    $package->setReleaseVersion($version);
    $package->setAPIVersion($apiVersion);
    $package->setReleaseStability($stability);
    $package->setAPIStability($apiStability);
    foreach ($maintainers as $maintainer) {
        $package->addMaintainer($maintainer['role'], $maintainer['handle'], $maintainer['name'], $maintainer['email'], $maintainer['active'] ?: 'yes');
    }
    $package->setPackageType($type);
    if (strpos($type, 'ext') !== false) {
        $package->setProvidesExtension($name);
        if (strpos($type, 'extsrc') !== false && isset($configureOptions)) {
            foreach ($configureOptions as $configureOption) {
                $package->addConfigureOption($configureOption['name'], $configureOption['prompt'], $configureOption['default']);
            }
        }
    }
    $package->setPhpDep($phpDep);
    $package->setPearinstallerDep($pearDep);
    if (isset($packageDeps)) {
        foreach ($packageDeps as $packageDeps) {
            $min = $packageDeps['min'] ?: false;
            $max = $packageDeps['max'] ?: false;
            $recommended = $packageDeps['recommended'] ?: false;
            $exclude = $packageDeps['exclude'] ?: false;
            $nodefault = $packageDeps['nodefault'] ?: false;
            $package->addSubpackageDepWithChannel($packageDeps['type'], $packageDeps['name'], $packageDeps['channel'], $min, $max, $recommended, $exclude, $nodefault);
        }
    }
    $package->setChannel($channel);
    return $package;
}
开发者ID:dong777,项目名称:qrcode,代码行数:47,代码来源:package.php

示例3: array

$package = new PEAR_PackageFileManager2();
$result = $package->setOptions(array('filelistgenerator' => 'cvs', 'changelogoldtonew' => false, 'simpleoutput' => true, 'baseinstalldir' => '/', 'packagefile' => 'package.xml', 'packagedirectory' => '.', 'clearcontents' => true, 'ignore' => array('package.php', 'package.xml'), 'dir_roles' => array('docs' => 'doc', 'examples' => 'doc', 'tests' => 'test'), 'exceptions' => array('CREDITS' => 'doc', 'EXPERIMENTAL' => 'doc', 'LICENSE' => 'doc', 'TODO' => 'doc')));
if (PEAR::isError($result)) {
    echo $result->getMessage();
    die;
}
$package->clearDeps();
$package->setPackage('python');
$package->setPackageType('extsrc');
$package->setSummary('Embedded Python');
$package->setDescription($desc);
$package->setChannel('pecl.php.net');
$package->setLicense('MIT License');
$package->addMaintainer('lead', 'jon', 'Jon Parise', 'jon@php.net');
$package->addRelease();
$package->setProvidesExtension('python');
$package->setAPIVersion('0.6.0');
$package->setAPIStability('alpha');
$package->setReleaseVersion($version);
$package->setReleaseStability('alpha');
$package->setNotes($notes);
$package->setPhpDep('5.3.0');
$package->setPearInstallerDep('1.4.3');
$package->generateContents();
if ($_SERVER['argv'][1] == 'commit') {
    $result = $package->writePackageFile();
} else {
    $result = $package->debugPackageFile();
}
if (PEAR::isError($result)) {
    echo $result->getMessage();
开发者ID:Jvbzephir,项目名称:php-python,代码行数:31,代码来源:package.php


注:本文中的PEAR_PackageFileManager2::setProvidesExtension方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。