PEAR_PackageUpdate::factory
Вернуться к: PEAR_PackageUpdate
PEAR_PackageUpdate::factory
Synopsis
mixed PEAR_PackageUpdate::factory ( string $driver , string $packageName , string $channel , string $user_file = '' , string $system_file = '' , string $pref_file = '' )
Factory method for creating PEAR_PackageUpdate frontend instances.
Parameter
- string $driver
-
The name of a frontend driver class. Must be one of Gtk2, Cli, or Web.
- string $packageName
-
The name of the package to be updated. Example: PEAR_PackageFileManager_Web.
- string $channel
-
The name of the channel $packageName is hosted on. This may be a fully qualified channel name such as pear.php.net or a short channel name like pear.
- string $user_file
-
The path to the file to read PEAR user-defined options from.
- string $system_file
-
The path to the file to read PEAR system-wide defaults from.
- string $pref_file
-
The path to the file to read user's preferences from.
Throws
throws PEAR_PACKAGEUPDATE_ERROR_NONEXISTENTDRIVER, when invalid driver name is used (i.e. Gtk2, Cli, Web).
Note
since 0.4.0a1
This function should be called statically.
Return value
mixed - reference to a new object or FALSE if the object could not be created (i.e. invalid driver name).
Вернуться к: PEAR_PackageUpdate