\CanvasAPIviaLTI_Installer

Manage the installation of the LTI application on a LAMP stack

Summary

Methods
Properties
Constants
appendMessage()
createSecretsFile()
createLTIDatabaseTables()
createAppDatabaseTables()
initAppMetadata()
acquireAPIToken()
No public properties found
SECRETS_NEEDED_STEP
SECRETS_ENTERED_STEP
API_DECISION_NEEDED_STEP
API_DECISION_ENTERED_STEP
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

SECRETS_NEEDED_STEP

SECRETS_NEEDED_STEP

SECRETS_ENTERED_STEP

SECRETS_ENTERED_STEP

API_DECISION_NEEDED_STEP

API_DECISION_NEEDED_STEP

API_DECISION_ENTERED_STEP

API_DECISION_ENTERED_STEP

Methods

appendMessage()

appendMessage(string  $message) 

Append another message to the output of the install script.

TODO maybe some nicer HTML generation

Parameters

string $message

The message to append (HTML formatting is fine).

createSecretsFile()

createSecretsFile(scalar  $step = self::SECRETS_NEEDED_STEP) 

Generate a SECRETS_FILE from user input.

Parameters

scalar $step

optional Where are we in the SECRETS_FILE creation workflow? (defaults to SECRETS_NEEDED_STEP -- the beginning)

Throws

\CanvasAPIviaLTI_Installer_Exception

If form submission does not contain all required MySQL credentals (host, username, password and database)

\CanvasAPIviaLTI_Installer_Exception

If SECRETS_FILE cannot be created

\CanvasAPIviaLTI_Installer_Exception

If $step is not a pre-defined *_STEP constant

createLTIDatabaseTables()

createLTIDatabaseTables() 

Create database tables to back LTI_Tool_Provider

Throws

\CanvasAPIviaLTI_Installer_Exception

If database schema not found in vendors directory

\CanvasAPIviaLTI_Installer_Exception

If database tables are not created

createAppDatabaseTables()

createAppDatabaseTables() 

Create database tables to back app

Throws

\CanvasAPIviaLTI_Installer_Exception

If database tables are not created

initAppMetadata()

initAppMetadata() : \AppMetadata

Initialize the app metadata store, especially the APP_PATH and APP_URL

Returns

\AppMetadata

acquireAPIToken()

acquireAPIToken(scalar  $step = self::API_DECISION_NEEDED_STEP, boolean  $skip = false) 

Obtain a Canvas API token, if needed.

Parameters

scalar $step

optional Where are we in the API token negotiation workflow? (defaults to API_DECISION_NEEDED_STEP -- the beginning)

boolean $skip

optional Skip this step (defaults to FALSE)

Throws

\CanvasAPIviaLTI_Installer_Exception

If $step is not a pre-defined *_STEP constant