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


PHP PEAR_PackageFileManager2::debugPackageFile方法代码示例

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


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

示例1: array

$description = <<<EOT
Tumblr blog integration with Site package.
EOT;
$package = new PEAR_PackageFileManager2();
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$result = $package->setOptions(array('filelistgenerator' => 'file', 'simpleoutput' => true, 'baseinstalldir' => '/', 'packagedirectory' => './', 'dir_roles' => array('Sniftr' => 'php', 'locale' => 'data', 'www' => 'data', 'dependencies' => 'data', '/' => 'data')));
$package->setPackage('Sniftr');
$package->setSummary('Tumblr blog integration for Site package.');
$package->setDescription($description);
$package->setChannel('pear.silverorange.com');
$package->setPackageType('php');
$package->setLicense('LGPL', 'http://www.gnu.org/copyleft/lesser.html');
$package->setReleaseVersion($version);
$package->setReleaseStability('alpha');
$package->setAPIVersion('0.1.0');
$package->setAPIStability('alpha');
$package->setNotes($notes);
$package->addIgnore('package.php');
$package->addMaintainer('lead', 'gauthierm', 'Mike Gauthier', 'mike@silverorange.com');
$package->addReplacement('Sniftr/Sniftr.php', 'pear-config', '@DATA-DIR@', 'data_dir');
$package->setPhpDep('5.3.0');
$package->setPearinstallerDep('1.4.0');
$package->addPackageDepWithChannel('required', 'Site', 'pear.silverorange.com', '1.5.25');
$package->addExtensionDep('required', 'curl');
$package->addExtensionDep('required', 'simplexml');
$package->generateContents();
if (isset($_GET['make']) || isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
    $package->writePackageFile();
} else {
    $package->debugPackageFile();
}
开发者ID:GervaisdeM,项目名称:sniftr,代码行数:31,代码来源:package.php

示例2: dirname

PEAR::setErrorHandling(PEAR_ERROR_DIE);
$packagexml = new PEAR_PackageFileManager2();
$packagexml->setOptions(array('baseinstalldir' => '/', 'packagedirectory' => dirname(__FILE__), 'filelistgenerator' => 'file', 'ignore' => array('TODO'), 'exceptions' => array('README' => 'doc', 'LICENSE' => 'doc')));
$packagexml->setPackage('sfFacebookConnectPlugin');
$packagexml->setSummary('Add easily Facebook connect to your symfony website and/or develop IFrame-FBML agnostic Facebook applications.');
$packagexml->setDescription('The sfFacebookConnectPlugin provides multiples functionalities geared both at making Facebook Connect integration in a symfony website easy and also help develop Facebook applications. This is achieved by smoothly connecting sfGuard (Doctrine AND Propel) with Facebook and helping developers program without worrying about whether the application is FBML or IFrame/Facebook Connect.');
$packagexml->setChannel('plugins.symfony-project.org');
$packagexml->addMaintainer('lead', 'fabriceb', 'Fabrice Bernhard', 'fabriceb@theodo.fr');
$packagexml->addMaintainer('developer', 'oncletom', 'Thomas Parisot', 'thomas@oncle-tom.net');
$packagexml->addMaintainer('developer', 'dalexandre', 'Damien Alexandre', 'dalexandre@clever-age.com');
$packagexml->addMaintainer('developer', 'benjaming', 'Benjamin Grandfond', 'benjaming@theodo.fr');
$packagexml->setLicense('MIT License', 'http://www.symfony-project.org/license');
// This will ADD a changelog entry to an existing package.xml
$packagexml->setAPIVersion('1.1.1');
$packagexml->setReleaseVersion('1.1.1');
$packagexml->setNotes('Symfony 1.4 officialy compatible version');
$packagexml->setReleaseStability('stable');
$packagexml->setAPIStability('stable');
$packagexml->addRelease();
$packagexml->setPackageType('php');
$packagexml->setPhpDep('5.2.0');
$packagexml->setPearinstallerDep('1.4.1');
// Supported versions of Symfony
$packagexml->addPackageDepWithChannel('required', 'symfony', 'pear.symfony-project.com', '1.0.0', '1.5.0');
$packagexml->generateContents();
// Add the files
if (isset($_GET['make']) || isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
    $packagexml->writePackageFile();
} else {
    $packagexml->debugPackageFile();
}
开发者ID:benja-M-1,项目名称:sfFacebookConnectPlugin,代码行数:31,代码来源:genpkgxml.php

示例3: array

$post_install_script = $pfm->initPostinstallScript($postinstall_file);
$post_install_script->addParamGroup('setup',
    array($post_install_script->getParam('db_user', 'User', 'string', 'root'),
          $post_install_script->getParam('db_password', 'Password', 'string', ''),
          $post_install_script->getParam('db_host', 'Host', 'string', 'localhost'),
          $post_install_script->getParam('db_name', 'Database', 'string', 'intraface'),
          $post_install_script->getParam('path_root', 'Root path', 'string', '/home/intraface/'),
          $post_install_script->getParam('path_www', 'WWW Path', 'string', '/'),
          $post_install_script->getParam('path_template', 'template path', 'string', '/'),
          $post_install_script->getParam('path_template_kundelogin', 'kundelogin template', 'string', '/'),
          $post_install_script->getParam('intraface_private_key', 'Intraface key', 'string', '/'),
          $post_install_script->getParam('quickpay_merchant_id', 'Quickpay merchant', 'string', '/'),
          $post_install_script->getParam('quickpay_md5_secret', 'Quickpay secret', 'string', '/'),

    ),
    '');

$pfm->addPostInstallTask($post_install_script, $postinstall_file);
*/
$pfm->addInstallAs('www/.htaccess', 'elevforeningen.vih.dk/.htaccess');
$pfm->addInstallAs('www/index.php', 'elevforeningen.vih.dk/index.php');
$pfm->addInstallAs('www/gfx/images/vih75x151.gif', 'elevforeningen.vih.dk/gfx/images/vih75x151.gif');
$pfm->addInstallAs('www/gfx/images/widepics/hangingout1.jpg', 'elevforeningen.vih.dk/gfx/images/widepics/hangingout1.jpg');
$pfm->generateContents();
if (isset($_GET['make']) || isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
    if ($pfm->writePackageFile()) {
        exit('package file written');
    }
} else {
    $pfm->debugPackageFile();
}
开发者ID:vih-elevforening,项目名称:elevforeningen.vih.dk,代码行数:31,代码来源:makepackage.php

示例4: buildSubPackage

 public function buildSubPackage($dir, $baseinstalldir, $info)
 {
     $package = str_replace('/', '_', $baseinstalldir);
     $opts = array('packagedirectory' => $dir, 'filelistgenerator' => 'file', 'ignore' => array('*composer.json', '*package.xml'), 'baseinstalldir' => '/' . $info['target-dir'], 'packagefile' => 'package.xml');
     $pfm = new PEAR_PackageFileManager2();
     $e = $pfm->setOptions($opts);
     $pfm->setPackage($package);
     $pfm->setSummary($info['description']);
     $pfm->setDescription($info['description']);
     $pfm->setPackageType('php');
     $pfm->setChannel('guzzlephp.org/pear');
     $pfm->setAPIVersion('3.0.0');
     $pfm->setReleaseVersion($this->getVersion());
     $pfm->setAPIStability('stable');
     $pfm->setReleaseStability('stable');
     $pfm->setNotes($this->changelog_notes);
     $pfm->setPackageType('php');
     $pfm->setLicense('MIT', 'http://github.com/guzzle/guzzle/blob/master/LICENSE');
     $pfm->addMaintainer('lead', 'mtdowling', 'Michael Dowling', 'mtdowling@gmail.com', 'yes');
     $pfm->setDate($this->changelog_release_date);
     $pfm->generateContents();
     $phpdep = $this->guzzleinfo['require']['php'];
     $phpdep = str_replace('>=', '', $phpdep);
     $pfm->setPhpDep($phpdep);
     $pfm->setPearinstallerDep('1.4.6');
     foreach ($info['require'] as $type => $version) {
         if ($type == 'php') {
             continue;
         }
         if ($type == 'symfony/event-dispatcher') {
             $pfm->addPackageDepWithChannel('required', 'EventDispatcher', 'pear.symfony.com', '2.1.0');
         }
         if ($type == 'ext-curl') {
             $pfm->addExtensionDep('required', 'curl');
         }
         if (substr($type, 0, 6) == 'guzzle') {
             $gdep = str_replace('/', ' ', $type);
             $gdep = ucwords($gdep);
             $gdep = str_replace(' ', '_', $gdep);
             $pfm->addPackageDepWithChannel('required', $gdep, 'guzzlephp.org/pear', $this->getVersion());
         }
     }
     // can't have main Guzzle package AND sub-packages
     $pfm->addConflictingPackageDepWithChannel('Guzzle', 'guzzlephp.org/pear', false, $apiversion);
     ob_start();
     $startdir = getcwd();
     chdir((string) $this->basedir . '/build/pearwork');
     echo "DEBUGGING GENERATED PACKAGE FILE\n";
     $result = $pfm->debugPackageFile();
     if ($result) {
         $out = $pfm->writePackageFile();
         echo "\n\n\nWRITE PACKAGE FILE RESULT:\n";
         var_dump($out);
         // load up package file and build package
         $packager = new PEAR_Packager();
         echo "\n\n\nBUILDING PACKAGE FROM PACKAGE FILE:\n";
         $dest_package = $packager->package($opts['packagedirectory'] . '/package.xml');
         var_dump($dest_package);
     } else {
         echo "\n\n\nDEBUGGING RESULT:\n";
         var_dump($result);
     }
     echo "removing package.xml";
     unlink($opts['packagedirectory'] . '/package.xml');
     $log = ob_get_clean();
     file_put_contents((string) $this->basedir . '/build/artifacts/logs/pear_package_' . $package . '.log', $log);
     chdir($startdir);
 }
开发者ID:Frinstio,项目名称:AlfredWorkflow.com,代码行数:68,代码来源:GuzzlePearPharPackageTask.php

示例5:

$p2->setSummary($summary);
$p2->setDescription($description);
$p2->setChannel('pear.php.net');
$p2->setPackageType('php');
$p2->addGlobalReplacement('package-info', '@package_version@', 'version');
$p2->generateContents();
$p2->setReleaseVersion($current_version);
$p2->setAPIVersion('1.4.0');
$p2->setReleaseStability($current_stability);
$p2->setAPIStability('stable');
$p2->setNotes($current_notes);
$p2->addGlobalReplacement('package-info', '@package_version@', 'version');
$p2->addInstallAs('tests/AllTests.php', 'AllTests.php');
$p2->addInstallAs('tests/Net_FTPTest.php', 'Net_FTPTest.php');
$p2->addInstallAs('tests/config.php.dist', 'config.php.dist');
$p2->addInstallAs('tests/testfile.dat', 'testfile.dat');
$p2->addInstallAs('tests/extensions.ini', 'extensions.ini');
$p2->addRelease();
$p2->addMaintainer('lead', 'jorrit', 'Jorrit Schippers', 'jschippers@php.net', 'yes');
$p2->addMaintainer('lead', 'toby', 'Tobias Schlitt', 'toby@php.net', 'no');
$p2->setPhpDep('4.3.0');
$p2->setPearinstallerDep('1.3.0');
$p2->setLicense('BSD License', 'http://www.opensource.org/licenses/bsd-license.html');
$p2->addExtensionDep('required', 'ftp');
if (isset($_GET['make']) || isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
    echo "Writing package file\n";
    $p2->writePackageFile();
} else {
    echo "Debugging package file\n";
    $p2->debugPackageFile();
}
开发者ID:pear,项目名称:net_ftp,代码行数:31,代码来源:generate_package_xml.php

示例6: handleError

$pkg->setNotes($notes);
$pkg->setPackageType('php');
$pkg->setPhpDep('5.0.0');
$pkg->setPearinstallerDep('1.4.9');
// Require custom file role for our web installation
// $pkg->addPackageDepWithChannel('required', 'Role_Web', 'pearified.com');
// Define that we will use our custom file role in this script
// $pkg->addUsesRole('web', 'Webfiles');
// Create the current release and add it to the package definition
$pkg->addRelease();
handleError($pkg->generateContents());
// Package release needs a maintainer
foreach ($maintainers as $m) {
    handleError($pkg->addMaintainer($m[0], $m[1], $m[2], $m[3]));
}
if ($argv[1] === 'write') {
    handleError($pkg->writePackageFile());
    exit(1);
}
handleError($pkg->debugPackageFile());
/**
 * Simple error handler
 *
 * @param Exception $e
 */
function handleError($e)
{
    if (PEAR::isError($e)) {
        die($e->getMessage());
    }
}
开发者ID:RA2WP,项目名称:RA2WP,代码行数:31,代码来源:build_package.php

示例7: _debugPrint

 */
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");
}
if (PEAR::isError($result)) {
    _debugPrint($result->getMessage() . "\n");
    exit;
}
_debugPrint("End Script\n");
/**
 * デバック表示
 *
 * @param string $message でバックメッセージ
 *
 * @return void
 */
function _debugPrint($message)
开发者ID:ryo88c,项目名称:BEAR.Saturday,代码行数:31,代码来源:make_package.php

示例8: Exception

$pkg->addMaintainer('lead', 'firman', 'Firman Wandayandi', 'firman@php.net');
$pkg->addMaintainer('lead', 'c01234', 'C.A. Woodcock', 'c01234@netcomuk.co.uk');
$pkg->addMaintainer('developer', 'alan_k', 'Alan Knowles', 'alan@akbkhome.com');
$pkg->addMaintainer('helper', 'scar', 'Leonardo Dutra', 'scar@php.net');
// Core dependencies.
$pkg->setPhpDep('4.3');
$pkg->setPearinstallerDep('1.4.0');
//$pkg->addDependency("Numbers_Words", "0.15.0", "eq", "pkg", true);
//$pkg->detectDependencies();
// Add some replacements.
$pkg->addGlobalReplacement('package-info', '@package_version@', 'version');
// Generate file contents.
$pkg->generateContents();
// Writes a package.xml.
if (isset($_GET['make']) || isset($_SERVER['argv']) && @$_SERVER['argv'][1] == 'make') {
    $e = $pkg->writePackageFile();
    // Some errors occurs.
    if (PEAR::isError($e)) {
        throw new Exception('Unable to write package file. Got message: ' . $e->getMessage());
    }
} else {
    $pkg->debugPackageFile();
}
/*
 * Local variables:
 * mode: php
 * tab-width: 4
 * c-basic-offset: 4
 * c-hanging-comment-ender-p: nil
 * End:
 */
开发者ID:MagnusA,项目名称:Date,代码行数:31,代码来源:buildPackageXML.php


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