* @return bool true if successful, false if not
*/
- function install($pkgfile, $options = array())
+ function install($pkgfile, $options = array(), $config = null)
{
// recognized options:
// - register_only : update registry but don't install files
if (preg_match('#^(http|ftp)://#', $pkgfile)) {
$need_download = true;
} elseif (!@is_file($pkgfile)) {
+ if (preg_match('/^[A-Z][A-Za-z0-9_]+$/', $pkgfile)) {
+ // valid package name
+ if ($config === null) {
+ $pkgfile = "http://pear.php.net/get/$pkgfile";
+ } else {
+ $pkgfile = "http://" . $config->get('master_server') .
+ "/get/$pkgfile";
+ }
+ $need_download = true;
+ }
return $this->raiseError("could not open the package file: $pkgfile");
}
}
// }}}
+ // {{{ checkDeps()
function checkDeps(&$pkginfo)
{
}
return false;
}
+
+ // }}}
}
?>
\ No newline at end of file