Config
Get system and account config values
Get system and account config values
if ( $this->get('config','connections_disabled') ){ // DO MY TEST STUFF }
Get app version number:
$version = $this->get('config', 'version');
You can use / to get value in deeper level:
$testSender = $this->get('config', 'test/email/from');
You can set values in runtime, that are valid only for that request:
$this->get('config')->setParam('connections_disabled', true);
// Now app does not send emails, sms, webservice calls...
$this->get('config')->setParam('test/email/to', 'test@ekansio.fi');
// If testmode, all emails are sent to test@ekansio.fi
Method | return | Description |
---|---|---|
getParam(key) | mixed | Return parameter from config values. |
setParam(key,value) | Config | Set config value (for this request). |
Key | return | Description |
---|---|---|
name | string | Application name. |
version | string | Application version number. |
environment | string | production / development |
connections_disabled | bool | Prevent all email, sms, webservice calls. |
testmode | bool | If testmode, all email/sms are sent using test parameters. |
test/email/from | string | Email address to use as sender, when testmode is on. |
test/email/to | string | Email address to use as receiver, when testmode is on. |
test/email/cc | string | Email to use as additional receiver, when testmode is on. |
test/email/bcc | string | Email to use as hidden additional receiver, when testmode is on. |
test/email/replyto | string | Email to use as reply to -address, when testmode is on. |
test/email/subject | string | Prefix text to add in subject, when testmode is on. |
test/email/body | string | Prefix text to add in message, when testmode is on. |
test/email/footer | string | Suffix text to add in footer, when testmode is on. |
test/sms/from | string | Phone number to use as sender, when testmode is on. |
test/sms/to | string | Phone number to use as receiver, when testmode is on. |
test/sms/body | string | Prefix text to add in message, when testmode is on. |
test/sms/footer | string | Suffix text to add in footer, when testmode is on. |
Key | return | Description |
---|---|---|
tuloste | array | Billing contanct information etc. |
workhours | array | Workhour preferences |
webservice | array[] | Webservice connection settings. |
drive | array[] | Drive connection settings. |
database | array[] | Database connection settings. |
mailbox | array | Email field functionality.FieldEmail toiminnallisuus |