# \App

App Class of the back-end application

This class allow the communication between the front-end application and the library which allow to send requests to an Openstack instance.

## Summary

Methods
Properties
Constants
__construct()
setToken()
checkToken()
getLibClass()
authenticate()
deauthenticate()
getPostParam()
setPostParam()
setOutput()
getErrorInstance()
show()
No public properties found
No constants found
No protected methods found
$openstack
$postParams
$tokenClass
$tokenPost
$errorClass
$output
N/A
No private methods found
No private properties found
N/A

File
  core/App.php
Package
  Default
Class hierarchy
  \App

## Tags

None found

## Properties

### $openstack

    $openstack : \OpenStack\OpenStack

#### Type

\OpenStack\OpenStack — protected, contains the main library object

#

## Tags

None found

### $postParams

    $postParams : Array

#### Type

Array — protected, contains the post parameters

#

## Tags

None found

### $tokenClass

    $tokenClass : \genTokenOptions

#### Type

\genTokenOptions — protected, contains the class object for the authentication override of the library

#

## Tags

None found

### $tokenPost

    $tokenPost : String

#### Type

String — protected, contains the token given in parameter

#

## Tags

None found

### $errorClass

    $errorClass : \errorManagement

#### Type

\errorManagement — protected, contains the errorManagement object

#

## Tags

None found

### $output

    $output : Array

#### Type

Array — protected, contains the result for the API call

#

## Tags

None found

## Methods

### __construct()

    __construct(Array  $args) : \App

App constructor

#### Parameters

Array | $args | Args for the OpenStack Library

#### Returns

\App —

object

#

## Tags

None found

### setToken()

    setToken(String  $token)

Set the class var $tokenPost and load the token into the genTokenOptions Class

#### Parameters

String | $token | token to be set

#

## Tags

None found

### checkToken()

    checkToken() : Boolean

Check the expiration of the token

#### Returns

Boolean —

if the token is not expired

#

## Tags

None found

### getLibClass()

    getLibClass(String  $service) : \Core

Get the service Class given the name in parameter

#### Parameters

String | $service | Name of the service

#### Returns

\Core —

object

#

## Tags

None found

### authenticate()

    authenticate() : void

Generate the token for the different services in OpenStack

#

## Tags

None found

### deauthenticate()

    deauthenticate() : void

Revoke the openstack services' token

#

## Tags

None found

### getPostParam()

    getPostParam(String  $name) : Object

Retrieve a post parameter given its name

#### Parameters

String | $name | Expected post parameter's name

#### Returns

Object —

Post value

#

## Tags

None found

### setPostParam()

    setPostParam(String  $param, Object  $value) : void

Set a post parameter for automating task

#### Parameters

String | $param | Name for the Post entry
Object | $value | Value for the Post entry

#

## Tags

None found

### setOutput()

    setOutput(String  $key, Array  $out) : void

Set a new output message

#### Parameters

String | $key | Array key for the message
Array | $out | Message's value

#

## Tags

None found

### getErrorInstance()

    getErrorInstance() : \errorManagement

Retrieve the errorManagement instance Object

#### Returns

\errorManagement —

object

#

## Tags

None found

### show()

    show() : void

Output the messages to be send to the client

#

## Tags

None found

### App.php