ModuleInstall/PackageManager/PackageManager.php
Constants
\PackageManager
Properties
Methods

PackageManager(
)
:
voidConstructor: In this method we will initialize the nusoap client to point to the hearbeat server

authenticate(
\username $username, \password $password, \systemname $systemname
=
'', $terms_checked
=
true
)
:
trueGiven the Mambo username, password, and download key attempt to authenticate, if successful then store these credentials
| Name | Type | Description |
|---|---|---|
| $username | \username | Mambo username |
| $password | \password | Mambo password |
| $systemname | \systemname | the user's download key |
| $terms_checked |
| Type | Description |
|---|---|
| true | if successful, false otherwise |

buildPackageXML(
$package, $releases
=
array()
)
:
void| Name | Type | Description |
|---|---|---|
| $package | ||
| $releases |

checkForUpdates(
)
:
voidGrab the list of installed modules and send that list to the depot.
The depot will then send back a list of modules that need to be updated

download(
\category_id $category_id, \package_id $package_id, \release_id $release_id
)
:
\filenameRetrieve the package as specified by the $id from the heartbeat server
| Name | Type | Description |
|---|---|---|
| $category_id | \category_id | the category_id to which the release belongs |
| $package_id | \package_id | the package_id to which the release belongs |
| $release_id | \release_id | the release_id to download |
| Type | Description |
|---|---|
| \filename | - the path to which the zip file was saved |

extractFile(
$zip_file, $file_in_zip, $base_tmp_upgrade_dir
)
:
void| Name | Type | Description |
|---|---|---|
| $zip_file | ||
| $file_in_zip | ||
| $base_tmp_upgrade_dir |

extractManifest(
$zip_file, $base_tmp_upgrade_dir
)
:
void| Name | Type | Description |
|---|---|---|
| $zip_file | ||
| $base_tmp_upgrade_dir |

getCategories(
\category_id $category_id, \filter $filter
=
array()
)
:
arrayGet a list of categories from the SugarDepot
| Name | Type | Description |
|---|---|---|
| $category_id | \category_id | the category id of parent to obtain |
| $filter | \filter | an array of filters to pass to limit the query |
| Type | Description |
|---|---|
| array | an array of categories for display on the client |

getCategoryPackages(
$category_id
=
'', $filter
=
array()
)
:
\category_packagesObtain the list of category_packages from SugarDepot
| Name | Type | Description |
|---|---|---|
| $category_id | ||
| $filter |
| Type | Description |
|---|---|
| \category_packages |

getDocumentation(
\package_id $package_id, \release_id $release_id
)
:
\documentsRetrieve documentation for the given release or package
| Name | Type | Description |
|---|---|---|
| $package_id | \package_id | the specified package to retrieve documentation |
| $release_id | \release_id | the specified release to retrieve documentation |
| Type | Description |
|---|---|
| \documents |

getInstalled(
\type $types
=
array('module')
)
:
\anRun the query to obtain the list of installed types as specified by the type param
| Name | Type | Description |
|---|---|---|
| $types | \type | an array of types you would like to search for type options include (theme, langpack, module, patch) |
| Type | Description |
|---|---|
| \an | array of installed upgrade_history objects |

getModuleLoaderCategoryPackages(
$category_id
=
''
)
:
voidObtain a list of category/packages/releases for use within the module loader
| Name | Type | Description |
|---|---|---|
| $category_id |

getPackages(
$category_id, $filter
=
array()
)
:
void| Name | Type | Description |
|---|---|---|
| $category_id | ||
| $filter |

getPromotion(
)
:
stringObtain a promotion from SugarDepot
| Type | Description |
|---|---|
| string | the string from the promotion |

getReleases(
$category_id, $package_id, $filter
=
array()
)
:
void| Name | Type | Description |
|---|---|---|
| $category_id | ||
| $package_id | ||
| $filter |

getinstalledPackages(
$types
=
array('module', 'langpack')
)
:
void| Name | Type | Description |
|---|---|---|
| $types |

performSetup(
$tempFile, $view
=
'module', $display_messages
=
true
)
:
void| Name | Type | Description |
|---|---|---|
| $tempFile | ||
| $view | ||
| $display_messages |

setCredentials(
$username, $password, $systemname
)
:
void| Name | Type | Description |
|---|---|---|
| $username | ||
| $password | ||
| $systemname |