ModuleInstall/PackageManager/PackageManager.php

Show: inherited
Table of Contents

Constants

Constant  CREDENTIAL_CATEGORY = "ml"
Constant  CREDENTIAL_USERNAME = "username"
Constant  CREDENTIAL_PASSWORD = "password"

\PackageManager

Package:

Properties

Propertypublic  $soap_client= ''
Details
Type
n/a

Methods

methodpublicPackageManager( ) : void

Constructor: In this method we will initialize the nusoap client to point to the hearbeat server

methodpublicauthenticate( \username $username, \password $password, \systemname $systemname = '',  $terms_checked = true ) : true

Given the Mambo username, password, and download key attempt to authenticate, if successful then store these credentials

Parameters
Name Type Description
$username \username

Mambo username

$password \password

Mambo password

$systemname \systemname

the user's download key

$terms_checked
Returns
Type Description
true if successful, false otherwise
methodpublicbuildInstalledReleases(  $types = array('module') ) : void

Parameters
Name Type Description
$types
methodpublicbuildPackageXML(  $package,  $releases = array() ) : void

Parameters
Name Type Description
$package
$releases
methodpubliccheckForUpdates( ) : void

Grab 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

methodpublicdownload( \category_id $category_id, \package_id $package_id, \release_id $release_id ) : \filename

Retrieve the package as specified by the $id from the heartbeat server

Parameters
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

Returns
Type Description
\filename - the path to which the zip file was saved
methodpublicextractFile(  $zip_file,  $file_in_zip,  $base_tmp_upgrade_dir ) : void

Parameters
Name Type Description
$zip_file
$file_in_zip
$base_tmp_upgrade_dir
methodpublicextractManifest(  $zip_file,  $base_tmp_upgrade_dir ) : void

Parameters
Name Type Description
$zip_file
$base_tmp_upgrade_dir
methodpublicfromNameValueList(  $nvl ) : void

Parameters
Name Type Description
$nvl
methodpublicgetCategories( \category_id $category_id, \filter $filter = array() ) : array

Get a list of categories from the SugarDepot

Parameters
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

Returns
Type Description
array an array of categories for display on the client
methodpublicgetCategoryPackages(  $category_id = '',  $filter = array() ) : \category_packages

Obtain the list of category_packages from SugarDepot

Parameters
Name Type Description
$category_id
$filter
Returns
Type Description
\category_packages
methodpublicgetCredentials( ) : void

methodpublicgetDocumentation( \package_id $package_id, \release_id $release_id ) : \documents

Retrieve documentation for the given release or package

Parameters
Name Type Description
$package_id \package_id

the specified package to retrieve documentation

$release_id \release_id

the specified release to retrieve documentation

Returns
Type Description
\documents
methodpublicgetImageForType(  $type ) : void

Parameters
Name Type Description
$type
methodpublicgetInstallType(  $type_string ) : void

Parameters
Name Type Description
$type_string
methodpublicgetInstalled( \type $types = array('module') ) : \an

Run the query to obtain the list of installed types as specified by the type param

Parameters
Name Type Description
$types \type

an array of types you would like to search for type options include (theme, langpack, module, patch)

Returns
Type Description
\an array of installed upgrade_history objects
methodpublicgetLicenseFromFile(  $file ) : void

Parameters
Name Type Description
$file
methodpublicgetModuleLoaderCategoryPackages(  $category_id = '' ) : void

Obtain a list of category/packages/releases for use within the module loader

Parameters
Name Type Description
$category_id
methodpublicgetPackages(  $category_id,  $filter = array() ) : void

Parameters
Name Type Description
$category_id
$filter
methodpublicgetPackagesInStaging(  $view = 'module' ) : void

Parameters
Name Type Description
$view
methodpublicgetPromotion( ) : string

Obtain a promotion from SugarDepot

Returns
Type Description
string the string from the promotion
methodpublicgetReleases(  $category_id,  $package_id,  $filter = array() ) : void

Parameters
Name Type Description
$category_id
$package_id
$filter
methodpublicgetTermsAndConditions( ) : void

methodpublicgetUITextForType(  $type ) : void

Parameters
Name Type Description
$type
methodpublicgetinstalledPackages(  $types = array('module', 'langpack') ) : void

Parameters
Name Type Description
$types
methodpublicinitializeComm( ) : void

methodpublicperformInstall(  $file,  $silent = true ) : void

Parameters
Name Type Description
$file
$silent
methodpublicperformSetup(  $tempFile,  $view = 'module',  $display_messages = true ) : void

Parameters
Name Type Description
$tempFile
$view
$display_messages
methodpublicperformUninstall(  $name ) : void

Parameters
Name Type Description
$name
methodpublicsetCredentials(  $username,  $password,  $systemname ) : void

Parameters
Name Type Description
$username
$password
$systemname
methodpublictoNameValueList(  $array ) : void

Parameters
Name Type Description
$array
methodpublictoNameValueLists(  $arrays ) : void

Parameters
Name Type Description
$arrays
methodpublicunlinkTempFiles( ) : void

methodpublicvalidate_manifest(  $manifest ) : void

Parameters
Name Type Description
$manifest
Documentation was generated by DocBlox 0.18.1.