cvs: php4 /pear/PEAR Common.php
| From: | Martin Jansen | Date: | Thu, 15 Aug 2002 17:07:12 +0000 |
| Subject: | cvs: php4 /pear/PEAR Common.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-5763@lists.php.net to get a copy of this message | ||
mj Thu Aug 15 13:07:12 2002 EDT
Modified files:
/php4/pear/PEAR Common.php
Log:
* Fix bug #18918.
* Add some PHPdoc comments.
Index: php4/pear/PEAR/Common.php
diff -u php4/pear/PEAR/Common.php:1.76 php4/pear/PEAR/Common.php:1.77
--- php4/pear/PEAR/Common.php:1.76 Thu Jul 4 16:28:56 2002
+++ php4/pear/PEAR/Common.php Thu Aug 15 13:07:12 2002
@@ -17,7 +17,7 @@
// | Tomas V.V.Cox <cox@idecnet.com> |
// +----------------------------------------------------------------------+
//
-// $Id: Common.php,v 1.76 2002/07/04 20:28:56 mj Exp $
+// $Id: Common.php,v 1.77 2002/08/15 17:07:12 mj Exp $
require_once 'PEAR.php';
require_once 'Archive/Tar.php';
@@ -250,6 +250,13 @@
// }}}
// {{{ setFrontendObject()
+ /**
+ * Set object that represents the frontend to be used.
+ *
+ * @param object Reference of the frontend object
+ * @return void
+ * @access public
+ */
function setFrontendObject(&$ui)
{
$this->ui = &$ui;
@@ -259,6 +266,13 @@
// {{{ _unIndent()
+ /**
+ * Unindent given string (?)
+ *
+ * @param string $str The string that has to be unindented.
+ * @return string
+ * @access private
+ */
function _unIndent($str)
{
// remove leading newlines
@@ -943,6 +957,16 @@
// }}}
// {{{ infoFromAny()
+ /**
+ * Returns package information from different sources
+ *
+ * This method is able to extract information about a package
+ * from a .tgz archive or from a XML package definition file.
+ *
+ * @access public
+ * @param string Filename of the source ('package.xml',
'<package>.tgz')
+ * @return string
+ */
function infoFromAny($info)
{
if (is_string($info) && file_exists($info)) {
@@ -971,6 +995,15 @@
// }}}
// {{{ validatePackageInfo()
+ /**
+ * Validate XML package definition file.
+ *
+ * @param string Filename of the package archive or of the package definition file
+ * @param array Array that will contain the errors
+ * @param array Array that will contain the warnings
+ * @access public
+ * @return boolean
+ */
function validatePackageInfo($info, &$errors, &$warnings)
{
global $_PEAR_Common_maintainer_roles,
@@ -1098,6 +1131,13 @@
// }}}
// {{{ analyzeSourceCode()
+ /**
+ * Analyze the source code of the given PHP file
+ *
+ * @param string Filename of the PHP file
+ * @return mixed
+ * @access public
+ */
function analyzeSourceCode($file)
{
if (!function_exists("token_get_all")) {
@@ -1462,11 +1502,11 @@
$errno, $errstr));
}
return PEAR::raiseError("Connection to `$host:$port' failed:
$errstr", $errno);
- }
+ }
$request = "GET $path HTTP/1.0\r\n";
}
$request .= "Host: $host:$port\r\n".
- "User-Agent: ".PHP_VERSION."\r\n".
+ "User-Agent: PHP/".PHP_VERSION."\r\n".
"\r\n";
fwrite($fp, $request);
$headers = array();