blend4php  v0.1
A PHP API for interacting with Galaxy
 All Classes Functions Variables Pages
GalaxyInstance Class Reference
Inheritance diagram for GalaxyInstance:
GalaxyHTTPRequest

Public Member Functions

 __construct ($hostname, $port, $use_https=FALSE)
 
 getVersion ()
 
 authenticate ($username, $password, &$message= '')
 
 getURL ()
 
 setAPIKey ($api_key)
 
 getAPIKey ()
 
- Public Member Functions inherited from GalaxyHTTPRequest
 __construct ()
 
 httpGET ($URL, $curl_options=array())
 
 httpPOST ($URL, $input=NULL)
 
 httpPUT ($URL, $input=NULL)
 
 httpPATCH ($URL, $input=NULL)
 
 getRemoteFile ($URL, $file_name)
 
 uploadFile ($URL, $data, $files)
 
 httpDELETE ($URL, $input=NULL)
 
 auth ($URL, $username, $password)
 
 getError ()
 
 getErrorMessage ()
 
 getErrorType ()
 
 setError ($type, $message)
 
 expectArray ($response)
 

Protected Attributes

 $host
 
 $port
 
 $use_https
 
 $api_key
 

Constructor & Destructor Documentation

GalaxyInstance::__construct (   $hostname,
  $port,
  $use_https = FALSE 
)

The GalaxyInstance constructor.

Parameters
$hostnameThe hostname where the Galaxy server is located.
$portThe port on which the remote Galaxy instance is runinng.
$use_httpsShould be set to TRUE if the remote server uses HTTPS. Defaults to TRUE.
Returns
An instance of a GalaxyInstance object.

Member Function Documentation

GalaxyInstance::authenticate (   $username,
  $password,
$message = '' 
)

Authenticates a user with the remote Galaxy instance.

Corresponds to the Galaxy API method and path: GET /api/authenticate/baseauth

Parameters
$usernameThe username of the user.
$passwordThe password for the user.
$messageIf authentication fails then this variable will be set to contain the error message.
Returns
TRUE if authentication was successful, FALSE otherwise.
GalaxyInstance::getAPIKey ( )

Acquires the API key

Returns
string The API key that authorizes a user to certain actions.
GalaxyInstance::getURL ( )

Returns the URL for the remote Galaxy server.

The URL returned will include the protocol (HTTP, HTTPS), the hostname and the port.

Returns
string The URL for the remote Galaxy instance.
GalaxyInstance::getVersion ( )

Retrieves the version of the Galaxy API.

Returns
GalaxyInstance::setAPIKey (   $api_key)

Sets the API Key for this Galaxy instance.

Parameters
$api_keyThe API key of the Galaxy user.

Member Data Documentation

GalaxyInstance::$api_key
protected

The API Key for the user connection.

GalaxyInstance::$host
protected

The hostname where the Galaxy server is located.

GalaxyInstance::$port
protected

The port on which the remote Galaxy instance is runinng.

GalaxyInstance::$use_https
protected

Should be set to TRUE if the remote server uses HTTPS.


The documentation for this class was generated from the following file: