\Disco\manageManager

The Manager Class helps us manage our Disco Application. It primarly helps with getting and setting data in your configuration files http://github.com/discophp/project/blob/master/.config.php .

It also helps you see what jobs you have waiting in your Queue and the ability to kill them. You can also do fun stuff with it like calling methods of your Applications objects via the command line to inspect their results.

Summary

Methods
Properties
Constants
resolve()
jobs()
devMode()
maintenanceMode()
setConfig()
getConfig()
genRand()
genAES256Key()
setAES256Key()
genSalt()
setSalt()
install()
buildModel()
writeModel()
buildRecord()
writeRecord()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
getLengthBetweenParanthesis()
No private properties found
N/A

Methods

resolve()

resolve(integer  $delay = null, string|\Jeremeamia\SuperClosure\SerializableClosure  $obj, string  $method, string  $vars,   $domain) : void

This function is very important to the functioning of the Queue class.

It handles executing jobs that are pushed onto the Queue.

Parameters

integer $delay

The amount of time to wait before executing the job.

string|\Jeremeamia\SuperClosure\SerializableClosure $obj

The \Closure to call the job on or the name of the Facade to use.

string $method

The method name to call.

string $vars

The serialized form of the variables.

$domain

jobs()

jobs() : void

List the jobs that are currently queued on the system.

devMode()

devMode(null|boolean  $mode = null) : void

Set or Get the DEV_MODE in `app/config/config.php`.

Parameters

null|boolean $mode

Whether or not to place into dev mode.

maintenanceMode()

maintenanceMode(string|null  $mode = null) : void

Set or Get the MAINTENANCE_MODE in `app/config/config.php`.

Parameters

string|null $mode

Should the app be in maintenance mode?

setConfig()

setConfig(  $key, string  $value) : void

Set a variable in `app/config/config.php`.

Parameters

$key
string $value

The value to change the variable to.

getConfig()

getConfig(string  $find) : string

Get a variable in `app/config/config.php`.

Parameters

string $find

The variable to find.

Returns

string —

The value of $find.

genRand()

genRand(integer  $length) : string

Generate a random number between passed $length.

Parameters

integer $length

The length of the random string.

Returns

string —

The random $length string.

genAES256Key()

genAES256Key() 

Generate a 32 length AES256 Key

@return string

setAES256Key()

setAES256Key(  $k) : void

Set the AES256 Key in .config.php .

@param string $k The key.

Parameters

$k

genSalt()

genSalt(  $l) : string

Generate a random string of length `$l`.

@param integer $l The length of the string to generate.

Parameters

$l

Returns

string

setSalt()

setSalt(  $s) : void

Set the `SHA512_SALT` Key in `app/config/.config.php`.

@param string $s The salt.

Parameters

$s

install()

install() : void

This function generates and sets the `AES_KEY256` and `SHA512_SALT` keys in `app/config/.config.php` after the composer install.

buildModel()

buildModel(string  $table) : string

Build the guts of a model class.

Parameters

string $table

The table to build the model from.

Returns

string —

The guts of the model.

writeModel()

writeModel(string  $table, string  $model, string  $templatePath, string  $outputPath) : boolean

Write out a model generated by `self::buildModel()`.

Parameters

string $table

The table name.

string $model

The model markup generated by self::buildModel().

string $templatePath

The path to get the model template from.

string $outputPath

The path to write the model to.

Returns

boolean

buildRecord()

buildRecord(string  $table) : string

Build the guts of a record class.

Parameters

string $table

The table to build the record from.

Returns

string —

The guts of the record.

writeRecord()

writeRecord(string  $table, string  $record, string  $templatePath, string  $outputPath) : boolean

Write out a record generated by `self::buildRecord()`.

Parameters

string $table

The table name.

string $record

The record markup generated by self::buildRecord().

string $templatePath

The path to get the record template from.

string $outputPath

The path to write the record to.

Returns

boolean

getLengthBetweenParanthesis()

getLengthBetweenParanthesis(string  $type) : mixed

Get the length between paranethesis.

ex: int(9) return 9

Parameters

string $type

A mysql data type.

Returns

mixed —

Whats between paranethis.