ModuleInstall/PackageManager/PackageManagerComm.php

Show: inherited
Table of Contents

Constants

Constant  HTTPS_URL = "https://depot.sugarcrm.com/depot/SugarDepotSoap.php"
Constant  ACTIVE_STATUS = "ACTIVE"

\PackageManagerComm

Package:

Methods

methodpublicaddDownload( \category_id $category_id, \package_id $package_id, \release_id $release_id ) : \the

Add a requested download to the queue

Parameters
Name Type Description
$category_id \category_id

the category_id to fetch

$package_id \package_id

the package id which the release belongs to

$release_id \release_id

the release we want to download

Returns
Type Description
\the filename to download
methodpubliccheckForUpdates( \objects_to_check $objects_to_check ) : array

Send the list of installed objects, could be patches, or modules, .. to the depot and allow the depot to send back a list of corresponding updates

Parameters
Name Type Description
$objects_to_check \objects_to_check

an array of name_value_lists which contain the appropriate values which will allow the depot to check for updates

Returns
Type Description
array of name_value_lists of corresponding updates
methodpublicclearSession( ) : void

Clears out the session so we can reauthenticate.

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

Download a given release

Parameters
Name Type Description
$category_id \category_id

the category_id to fetch

$package_id \package_id

the package id which the release belongs to

$release_id \release_id

the release we want to download

Returns
Type Description
\download
Details
See
\download  
methodpublicdownloadedDocumentation( \document_id $document_id ) : void

Log that the user has clicked on a document

Parameters
Name Type Description
$document_id \document_id

the document the user has clicked on

methodpublicerrorCheck( ) : void

Check for errors in the response or error_str

methodpublicgetCategories( \category_id $category_id, \filter $filter = array() ) : \categories_and_packages

Return a list of child categories to the parent specified in category_id

Parameters
Name Type Description
$category_id \category_id

the parent category_id

$filter \filter

a filter which will limit theh number of results returned

Returns
Type Description
\categories_and_packages
Details
See
\categories_and_packages  
methodpublicgetCategoryPackages( \category_id $category_id, \filter $filter = array() ) : \categories_and_packages

A generic function which given a category_id some filter will return an object which contains categories and packages

Parameters
Name Type Description
$category_id \category_id

the category_id to fetch

$filter \filter

a filter which will limit theh number of results returned

Returns
Type Description
\categories_and_packages
Details
See
\categories_and_packages  
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
methodpublicgetPackages( \category_id $category_id, \filter $filter = array() ) : \packages

Return a list of packages which belong to the parent category_id

Parameters
Name Type Description
$category_id \category_id

the category_id to fetch

$filter \filter

a filter which will limit theh number of results returned

Returns
Type Description
\packages
Details
See
\packages  
methodpublicgetPromotion( ) : void

Get all promotions from the depot

methodpublicgetReleases( \category_id $category_id, \package_id $package_id,  $filter = array() ) : \packages

Return a list of releases belong to a package

Parameters
Name Type Description
$category_id \category_id

the category_id to fetch

$package_id \package_id

the package id which the release belongs to

$filter
Returns
Type Description
\packages
Details
See
\packages  
methodpublicgetTermsAndConditions( ) : void

methodpublicinitialize( \login $login = true ) : void

Initialize the soap client and store in the $GLOBALS object for use

Parameters
Name Type Description
$login \login

designates whether we want to try to login after we initialize or not

methodpublicisAlive( ) : true

Ping the server to determine if we have established proper communication

Returns
Type Description
true if we can communicate with the server and false otherwise
methodpubliclogin(  $terms_checked = true ) : true

Login to the depot

Parameters
Name Type Description
$terms_checked
Returns
Type Description
true if successful, false otherwise
methodpubliclogout( ) : void

Logout from the depot

methodpublicperformDownload( \filename $filename ) : \path
static

Call the PackageManagerDownloader function which uses curl in order to download the specified file

Parameters
Name Type Description
$filename \filename

the file to download

Returns
Type Description
\path to downloaded file
methodpublicsetCredentials( \username $username, \password $password, \download_key $download_key ) : void

Set the credentials for use during login

Parameters
Name Type Description
$username \username

Mambo username

$password \password

Mambo password

$download_key \download_key

User's download key

Documentation was generated by DocBlox 0.18.1.