\AppForm

A Form class

Controls all forms of the app

Summary

Methods
Properties
Constants
__construct()
getForm()
store()
update()
updateUsernameAndPassword()
uploadMedia()
No public properties found
No constants found
getFileName()
upload()
$path
$form
N/A
No private methods found
No private properties found
N/A

Properties

$path

$path : string

Path of file or directory

Type

string

$form

$form : array

Store form details error, message, input_value, input_message

Type

array

Methods

__construct()

__construct(string  $path = null) 

Initialize form

Parameters

string $path

Path for file or directory

getForm()

getForm() : array

Get form values

Returns

array —

Form values

store()

store(array  $input, object  $file) : boolean

Create a markdown file and store presentation contents

Parameters

array $input

Input values

object $file

Sim fileUpload object

Returns

boolean —

Presentation creation successful or note

update()

update(array  $input) : \App\booll

Update presentation contents of markdown file

Parameters

array $input

Input values

Returns

\App\booll —

Update presentation contents successful or not

updateUsernameAndPassword()

updateUsernameAndPassword(Array  $input) : boolean

Update username and password

Parameters

Array $input

Input values

Returns

boolean —

Update username password successful or not

uploadMedia()

uploadMedia(object  $file) : boolean

Upload media files

Parameters

object $file

Slim fileUpload object

Returns

boolean —

Media file upload successful or not

getFileName()

getFileName(string  $fileName) : \App\sring

Check filename exists at path or not If it exists change the filename by prefixing filename with file number

Parameters

string $fileName

Filename of the file

Returns

\App\sring —

New filename of the file

upload()

upload(object  $file, string  $fileName = null) : boolean

Upload file

Parameters

object $file

Slim fileUpload object

string $fileName

Filename to be renamed after uploading

Returns

boolean —

File upload successful or not