本文整理汇总了PHP中PEAR_PackageFileManager2::setExtends方法的典型用法代码示例。如果您正苦于以下问题:PHP PEAR_PackageFileManager2::setExtends方法的具体用法?PHP PEAR_PackageFileManager2::setExtends怎么用?PHP PEAR_PackageFileManager2::setExtends使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PEAR_PackageFileManager2
的用法示例。
在下文中一共展示了PEAR_PackageFileManager2::setExtends方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isSpam
* @copyright 2008 silverorange
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @link http://pear.php.net/package/Services_Akismet2
*/
require_once 'PEAR/PackageFileManager2.php';
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$api_version = '0.3.0';
$api_state = 'alpha';
$release_version = '0.3.0';
$release_state = 'alpha';
$release_notes = " * Fixed Bug #15567: Exception is thrown when referrer is not set in " . "comment.\n" . " * Fixed Req #15569: Ability to set a custom user-agent.\n" . " * Fixed Bug #15571: Don't always include server-related fields. There " . "is a new parameter on the isSpam() method to auto-set server-related " . "fields.\n" . " * API doc cleanups.\n" . " * Wrote end-user documentation (PEAR manual is not up-to-date yet, but " . "source files are in CVS).\n" . " * More complete unit tests.\n" . " * Fix bug in 0.2.0 that caused incorrect host to be used to requests " . "requiring an API key.\n" . " * Allow specifying comment as an array rather than an object.\n" . " * Make \$fields property of comment class protected for easier " . "sub-classing of the comment class.\n" . " * PHPCS cleanups.\n";
$description = "This package provides an object-oriented interface to the Akismet REST " . "API. The Akismet API is used to detect and to filter spam comments " . "posted on weblogs.\n\n" . "There are several anti-spam service providers that use the Akismet API. " . "To use the API, you will need an API key from such a provider. Example " . "providers include Wordpress (http://wordpress.com) and TypePad " . "(http://antispam.typepad.com).\n\n" . "Most services are free for personal or low-volume use, and offer " . "licensing for commercial or high-volume applications.\n\n" . "This package is derived from the miPHP Akismet class written by Bret " . "Kuhns for use in PHP 4. This package requires PHP 5.2.1.";
$package = new PEAR_PackageFileManager2();
$package->setOptions(array('filelistgenerator' => 'svn', 'simpleoutput' => true, 'baseinstalldir' => '/', 'packagedirectory' => './', 'dir_roles' => array('Services' => 'php', 'Services/Akismet2' => 'php', 'tests' => 'test'), 'ignore' => array('package.php')));
$package->setPackage('Services_Akismet2');
$package->setExtends('Services_Akismet');
$package->setSummary('PHP client for the Akismet REST API');
$package->setDescription($description);
$package->setChannel('pear.php.net');
$package->setPackageType('php');
$package->setLicense('MIT', 'http://www.opensource.org/licenses/mit-license.html');
$package->setNotes($release_notes);
$package->setReleaseVersion($release_version);
$package->setReleaseStability($release_state);
$package->setAPIVersion($api_version);
$package->setAPIStability($api_state);
$package->addMaintainer('lead', 'gauthierm', 'Mike Gauthier', 'mike@silverorange.com');
$package->addReplacement('Services/Akismet.php', 'package-info', '@api-version@', 'api-version');
$package->addReplacement('Services/Akismet.php', 'package-info', '@name@', 'name');
$package->setPhpDep('5.2.1');
$package->addPackageDepWithChannel('required', 'HTTP_Request2', 'pear.php.net', '0.1.0');